Skip to content

Conversation

@aleflm
Copy link
Contributor

@aleflm aleflm commented Oct 16, 2025

PR intention

Update code base to qt6

Needs #1676

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Walkthrough

Qt framework upgraded from version 5.11.3 to 6.7.3 across all build configurations. Build system refactored to support native Qt compilation with CMake-based flow, replacing autotools. LevelDB environment shutdown mechanism added. Qt API deprecated functions replaced with modern equivalents. Blake2 symbols prefixed for namespace isolation.

Changes

Cohort / File(s) Change Summary
Qt6 Version Configuration
CMakeLists.txt, README.md, doc/build-unix.md
Updated Qt package version requirement from 5.11.3 to 6.7.3 MODULE REQUIRED; removed CMAKE_SKIP_BUILD_RPATH settings; updated package dependency names (qt5-qtbase-devel → qt6-qtbase-devel, etc.) across documentation and build files.
Qt Dependency Discovery
cmake/module/FindQt.cmake
Removed extensive Qt5 static-library prioritization and Linux dependency discovery; eliminated find_library() invocations for fontconfig, expat, freetype, xcb-* libs, xkb*, Xau, z, and related Qt helper libraries; removed Qt5_Dependencies INTERFACE library and associated target_link_libraries entries.
Native Qt Build Package
depends/packages/native_qt.mk (new)
Added comprehensive per-package build workflow for native Qt compilation with fetch, extract, preprocess, config, build, stage, and postprocess macros; includes configuration options for release build, static linking, and platform-specific Darwin handling.
Qt Details & Base Package
depends/packages/qt_details.mk (new), depends/packages/qt.mk
Introduced qt_details.mk with Qt 6.7.3 version metadata and download hashes; migrated qt.mk from autotools to cmake-driven build flow with top-level component handling, cross-compilation support, and Darwin-specific SDK configuration.
Qt Package Dependencies
depends/packages/packages.mk, depends/packages/libxcb_util_cursor.mk (new)
Updated qt_linux_packages to include libxcb_util_cursor; added qt_freebsd_packages alias; introduced qt_native_packages := native_qt for cross-compilation; created new libxcb_util_cursor.mk with full build lifecycle.
Qt Patches
depends/patches/native_qt/*, depends/patches/qt/*
Added multiple patches: dont_hardcode_pwd.patch (replaces /bin/pwd with pwd), qtbase-moc-ignore-gcc-macro.patch, qtbase_avoid_native_float16.patch, qtbase_skip_tools.patch, qttools_skip_dependencies.patch, rcc_hardcode_timestamp.patch, qtbase_avoid_qmain.patch, qtbase_platformsupport.patch, qtbase_plugins_cocoa.patch, memory_resource.patch.
Build System Updates
depends/Makefile, depends/funcs.mk, depends/hosts/darwin.mk, depends/toolchain.cmake.in
Incremented CXX_STANDARD to c++20; added fetch_local_dir_sha256 macro and expanded build-id computation; enhanced Darwin cross-compilation flags (nostdinc++, isystem, platform_version); refactored CMAKE_FIND_ROOT_PATH handling and added PKG_CONFIG_PATH customization; introduced Qt6_ROOT and WITH_BDB gating.
Distribution Build Configs
contrib/rpm/bitcoin.spec, contrib/rpm/README.md, contrib/debian/rules, contrib/debian/changelog, contrib/guix/libexec/build.sh, depends/config.site.in
Updated all distribution package managers to use Qt6: rpm spec updated buildargs and BuildRequires; debian changelog and rules updated qt5 → qt6; guix build.sh expanded Darwin environment cleanup and PKG_CONFIG_PATH; config.site.in changed with_gui from qt5_debug to qt6_debug.
LevelDB Shutdown Interface
src/leveldb/include/leveldb/env.h, src/leveldb/util/env.cc, src/leveldb/util/env_posix.cc, src/leveldb/util/env_windows.cc, src/init.cpp
Added public virtual Shutdown() method to Env interface; implemented in PosixEnv and WindowsEnv with shutdown_requested_ flag and background-thread signaling; integrated leveldb::Env::Default()->Shutdown() call in init.cpp.
Blake2 Symbol Namespacing
src/crypto/MerkleTreeProof/blake2/blake2.h, src/crypto/MerkleTreeProof/blake2/blake2b.c
Added preprocessor macros to rename blake2b_* symbols to firo_blake2b_* variants (state, param, init, init_key, init_param, update, final, blake2b, blake2b_long, blake2b_4r_update, blake2b_4r_final) for namespace isolation.
Qt GUI Build Configuration
src/qt/CMakeLists.txt, src/qt/test/CMakeLists.txt
Migrated from qt5_import_plugins/qt5_add_translation to Qt6 equivalents; replaced Qt5::Core/Widgets/Network/DBus with Qt6 components; refactored translation generation to use custom QM workflow with Qt6::lrelease; added translations target dependency; extended translatable_sources_directories to include src/util; updated plugin handling for Xcb/Windows/macOS platforms.
Qt GUI API Modernization
src/qt/bitcoin.cpp, src/qt/bitcoinamountfield.cpp, src/qt/bitcoingui.cpp, src/qt/clientmodel.cpp, src/qt/coincontroldialog.cpp
Added showCloseWindow() and 1000ms shutdown delay in requestShutdown(); removed QApplication::globalStrut() expansion in minimumSizeHint; replaced Qt::ALT/CTRL constants with string-based shortcut definitions; replaced QDateTime::fromTime_t() with QDateTime::fromSecsSinceEpoch(); changed tristate flag to Qt::ItemIsUserTristate.
Qt Utility & Dialog Modernization
src/qt/guiutil.cpp, src/qt/notificator.cpp, src/qt/recentrequeststablemodel.cpp/h, src/qt/rpcconsole.cpp, src/qt/sendcoinsentry.cpp, src/qt/splashscreen.cpp, src/qt/transactionfilterproxy.cpp, src/qt/transactiontablemodel.cpp, src/qt/utilitydialog.cpp, src/qt/winshutdownmonitor.cpp/h
Replaced QRegExp with QRegularExpression for URL/pattern matching; replaced QDateTime::fromTime_t() with QDateTime::fromSecsSinceEpoch() across date handling; added ExtractFirstSuffixFromFilter() utility; refactored FreedesktopImage with DBus marshaling; updated WinShutdownMonitor::nativeEventFilter parameter type from long* to qintptr*; replaced QDesktopWidget with QScreen.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant BitcoinApp as Bitcoin Application
    participant ShutdownWindow
    participant CoreThread
    participant LevelDB as LevelDB Env

    User->>BitcoinApp: Request Shutdown
    BitcoinApp->>BitcoinApp: requestShutdown()
    BitcoinApp->>ShutdownWindow: showCloseWindow()
    ShutdownWindow->>User: Display Shutdown UI
    
    rect rgb(220, 240, 255)
    Note over BitcoinApp: 1000ms delay
    BitcoinApp->>BitcoinApp: Wait
    end
    
    BitcoinApp->>CoreThread: emit shutdownSignal
    CoreThread->>CoreThread: Shutdown Core
    CoreThread->>LevelDB: leveldb::Env::Default()->Shutdown()
    LevelDB->>LevelDB: Set shutdown_requested_=true
    LevelDB->>LevelDB: Signal background_work_cv_
    LevelDB->>CoreThread: Return (background thread exits)
    CoreThread->>BitcoinApp: shutdownResult()
    BitcoinApp->>ShutdownWindow: Close & Reset
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

  • Rationale: This is a large, heterogeneous PR involving Qt 5→6 framework migration across dozens of files, substantial build infrastructure refactoring (CMake, multiple package managers), new native Qt build package infrastructure with complex macro expansion, LevelDB shutdown mechanism, and widespread API modernization scattered across many Qt GUI files. The changes span multiple logical domains (build system, dependency management, UI/dialog code, utility code) with varying complexity per file. While many individual file changes follow repetitive patterns (e.g., time function replacements, regex class updates), the totality requires understanding Qt6 migration implications, build infrastructure interactions, and cross-platform considerations.

  • Areas requiring extra attention:

    • depends/packages/qt.mk and depends/packages/native_qt.mk: Complex build orchestration with cmake configuration, patches, cross-compilation handling, and dependency tracking
    • depends/funcs.mk: Macro-level build-id and recipe-hash computation changes affecting the entire build graph
    • src/qt/CMakeLists.txt: Translation pipeline refactoring and plugin import migration from Qt5 to Qt6 conventions
    • depends/toolchain.cmake.in: CMake toolchain root/prefix path logic and Qt6_ROOT/WITH_BDB conditional gating
    • LevelDB shutdown mechanism (src/leveldb/util/env_posix.cc, src/leveldb/util/env_windows.cc): Thread synchronization and background-thread lifecycle changes
    • Qt GUI shortcut string-based construction patterns (src/qt/bitcoingui.cpp): Verify Alt+%1 formatting produces correct cross-platform shortcuts

Possibly related PRs

  • fix close window #1670: Implements complementary leveldb::Env::Shutdown() and showCloseWindow()/requestShutdown() changes in src/init.cpp and src/qt/bitcoin.cpp that directly overlap with this PR's LevelDB and shutdown UI modifications.
  • CMake Build System Support #1504: Originally added the cmake/module/FindQt.cmake static-library prioritization and Qt5_Dependencies interface that this PR removes, providing context for the dependency discovery refactoring.
  • GUI freeze fix #1686: Modifies src/qt/clientmodel.cpp block-tip and time-handling logic that overlaps with this PR's QDateTime::fromSecsSinceEpoch() replacements and cached block count updates.

Suggested reviewers

  • levonpetrosyan93

🐰 Qt6 hops into town with modern C++20,
CMake recipes baked, dependencies out of sight,
LevelDB shutdown signals dance in the night,
Blake2 symbols firo-prefixed, all cozy and right.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal and lacks required details; it only states the high-level intent without explaining architectural changes, migration details, or why the dependency on PR #1676 exists. Expand the description to include: specific Qt version change (5.x to 6.7.3), key architectural/build system changes, rationale for dependency on PR #1676, and testing notes.
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'update qt6' is vague and generic, using a non-descriptive term that doesn't convey meaningful details about the changeset scope or purpose. Improve the title to be more specific and descriptive, such as 'Migrate GUI framework from Qt5 to Qt6' or 'Update Qt framework dependency to version 6.7.3'.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 19

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
src/leveldb/include/leveldb/env.h (1)

318-386: EnvWrapper should forward Shutdown() to target.

The EnvWrapper class forwards all other Env methods to target_, but doesn't override Shutdown(). For completeness of the wrapper pattern, add:

void Shutdown() override {
  target_->Shutdown();
}

While current usage via Env::Default() returns the unwrapped singleton and isn't affected, this omission could cause issues if future code wraps the Env with an EnvWrapper.

src/qt/bitcoingui.cpp (1)

314-344: Broken keyboard shortcuts: using string “Alt+%1” with numeric keycodes

QString("Alt+%1").arg(key++) interpolates the integer value of Qt::Key_1 (e.g., “Alt+49”), which QKeySequence won’t parse as “Alt+1”. Use the key enums directly.

Apply:

-    overviewAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
+    overviewAction->setShortcut(QKeySequence(Qt::ALT | key++));
-    sendCoinsAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
+    sendCoinsAction->setShortcut(QKeySequence(Qt::ALT | key++));
-    receiveCoinsAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
+    receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT | key++));
-    historyAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
+    historyAction->setShortcut(QKeySequence(Qt::ALT | key++));
-    lelantusAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
+    lelantusAction->setShortcut(QKeySequence(Qt::ALT | key++));
-    masternodeAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
+    masternodeAction->setShortcut(QKeySequence(Qt::ALT | key++));

Alternatively, in Qt6, prefer QKeySequence(QKeyCombination(Qt::AltModifier, key++)) for clarity.

Also applies to: 351-365

README.md (2)

179-181: Fix binary path: use build/bin.

-./bin/firo-qt
+build/bin/firo-qt

196-206: Cross-compilation section has a dangling table header.

You left a “Supported Cross-Compilation Targets” header with an empty table, then start a new “## Cross-Compilation” section. Clean this up.

-### Supported Cross-Compilation Targets
-
-| Host Target              | Platform                  |
-|--------------------------|---------------------------|
-## Cross-Compilation
+## Cross-Compilation
src/qt/notificator.cpp (1)

19-20: Qt6 include: prefer <QtDBus/QtDBus> over <QtDBus>.

Improves Qt6 compatibility.

-#include <QtDBus>
+#include <QtDBus/QtDBus>
🧹 Nitpick comments (15)
src/crypto/MerkleTreeProof/blake2/blake2.h (1)

1-11: Symbol namespacing approach is correct, but consider consistent naming and documentation.

The macro-based symbol renaming effectively prevents linker collisions with Blake2b implementations in Qt6 or other dependencies. The implementation is sound and correctly scoped.

However, there are two areas for improvement:

  1. Naming inconsistency: Lines 1-7 and 10-11 use the firo_ prefix pattern (e.g., firo_blake2b_state), while lines 8-9 use a _firo suffix pattern (e.g., blake2b_firo). Consider standardizing to one approach for consistency.

  2. Missing documentation: Add a brief comment explaining why these symbols are being renamed. This will help future maintainers understand the rationale.

Example:

+/* Symbol namespacing to avoid conflicts with Blake2b in Qt6 and other dependencies */
 #define blake2b_state firo_blake2b_state
 #define blake2b_param firo_blake2b_param
src/crypto/MerkleTreeProof/blake2/blake2b.c (1)

1-11: Symbol namespacing is consistent with header file.

The macro definitions correctly match those in blake2.h, ensuring consistent symbol renaming across the compilation unit. This is the proper approach.

As noted in the header file review, consider:

  1. Standardizing the naming pattern (prefix vs suffix) for consistency
  2. Adding a comment explaining the purpose of these macro definitions
depends/packages/libxcb_util_cursor.mk (1)

29-31: Make .la cleanup resilient

Use -f to avoid failing when no .la files exist (or switch to find).

Apply:

-  rm lib/*.la
+  rm -f lib/*.la

Optionally:

-  rm -f lib/*.la
+  find lib -name '*.la' -delete || true
src/qt/splashscreen.cpp (1)

24-24: Unused include (optional)

QScreen isn’t used here. You can drop the include or migrate the (commented) centering call to Qt6 QScreen before re-enabling.

contrib/debian/changelog (1)

48-49: Avoid rewriting historical changelog entries

Prefer adding a new top entry documenting the Qt6 migration instead of editing past entries to preserve history integrity.

Does any packaging automation parse these entries where this change could cause confusion?

src/qt/guiutil.cpp (1)

310-320: Header declaration for new helper

If ExtractFirstSuffixFromFilter is intended as a public utility, ensure it’s declared in guiutil.h. Otherwise, consider making it static or documenting it as internal.

Also applies to: 342-343, 386-389

depends/funcs.mk (1)

264-271: Polish CMake flags: libdir and verbose BOOL.

Trim trailing “/” and provide ON/OFF for BOOL.

Apply this diff:

-               -DCMAKE_INSTALL_LIBDIR=lib/ \
+               -DCMAKE_INSTALL_LIBDIR=lib \
-               -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-               -DCMAKE_VERBOSE_MAKEFILE:BOOL=$(V) \
+               -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+               -DCMAKE_VERBOSE_MAKEFILE:BOOL=$$(if $$(V),ON,OFF) \
src/qt/CMakeLists.txt (1)

365-377: Robust .qrc filtering.

Avoid relying on dot-included extension; match by regex on filename.

Apply this diff:

-      cmake_path(GET source EXTENSION LAST_ONLY ext)
-      if(ext STREQUAL ".qrc")
-        continue()
-      endif()
+      if(source MATCHES "\\.qrc$")
+        continue()
+      endif()
depends/packages/qt.mk (1)

88-92: Deduplicate repeated configure flags.

-no-zstd, -fontconfig, and -dbus-runtime appear multiple times. Clean up for clarity.

Also applies to: 170-182

src/qt/automintmodel.cpp (1)

111-115: Potential duplication growth in txs.

Re-adding immature txids every cycle can accumulate duplicates and unnecessary work. Consider deduping (std::unordered_set<uint256> or dedupe before insert).

If desired, I can provide a small helper to dedupe txs under cs.

README.md (2)

219-222: Clarify cross-compile configure step with toolchain.

Recommend mirroring earlier examples by specifying the toolchain when configuring.

-# Configure and build
-cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
+# Configure and build
+cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
 cmake --build build -j$(nproc)

128-131: Arch GUI deps missing Qt6 tools.

Add Qt6 GUI packages to match Qt6 migration.

-sudo pacman -S git base-devel python cmake
+sudo pacman -S git base-devel python cmake qt6-base qt6-tools
depends/packages/native_qt.mk (1)

40-89: Trim features further for native tools and align with Qt6 configure.

Optional tweaks:

  • Drop unnecessary options (e.g., -no-feature-printsupport) if already excluding -no-gui/-no-widgets.
  • Consider -no-feature-dbus unless needed for tools.
  • Verify -make tools + -feature-linguist is sufficient for only lrelease/lupdate.

I can propose a minimized option set after confirming which native tools are actually used in your build.

src/qt/notificator.cpp (2)

206-207: Freedesktop hint key: prefer image-data for broad compatibility.

Some servers expect image-data per spec.

-    hints["icon_data"] = FreedesktopImage::toVariant(tmpicon.pixmap(FREEDESKTOP_NOTIFICATION_ICON_SIZE).toImage());
+    hints["image-data"] = FreedesktopImage::toVariant(tmpicon.pixmap(FREEDESKTOP_NOTIFICATION_ICON_SIZE).toImage());

If your target environment relies on icon_data, keep both:

hints["image-data"] = ...;
hints["icon_data"] = hints["image-data"];

62-85: Ensure metatype is registered for queued usage if needed.

You call FreedesktopImage::metaType(); also consider qRegisterMetaType<FreedesktopImage>(); for QVariant usage across queued connections (harmless if redundant).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0df1855 and 0f4ecc0.

⛔ Files ignored due to path filters (1)
  • .github/workflows/ci-master.yml is excluded by !**/*.yml
📒 Files selected for processing (98)
  • CMakeLists.txt (1 hunks)
  • Dockerfile (2 hunks)
  • Makefile.am (0 hunks)
  • README.md (7 hunks)
  • autogen.sh (0 hunks)
  • build-aux/m4/ax_boost_base.m4 (0 hunks)
  • build-aux/m4/ax_boost_chrono.m4 (0 hunks)
  • build-aux/m4/ax_boost_filesystem.m4 (0 hunks)
  • build-aux/m4/ax_boost_program_options.m4 (0 hunks)
  • build-aux/m4/ax_boost_system.m4 (0 hunks)
  • build-aux/m4/ax_boost_thread.m4 (0 hunks)
  • build-aux/m4/ax_boost_unit_test_framework.m4 (0 hunks)
  • build-aux/m4/ax_check_compile_flag.m4 (0 hunks)
  • build-aux/m4/ax_check_link_flag.m4 (0 hunks)
  • build-aux/m4/ax_check_preproc_flag.m4 (0 hunks)
  • build-aux/m4/ax_cxx_compile_stdcxx.m4 (0 hunks)
  • build-aux/m4/ax_gcc_func_attribute.m4 (0 hunks)
  • build-aux/m4/ax_pthread.m4 (0 hunks)
  • build-aux/m4/ax_subdirs_configure.m4 (0 hunks)
  • build-aux/m4/bitcoin_find_bdb48.m4 (0 hunks)
  • build-aux/m4/bitcoin_qt.m4 (0 hunks)
  • build-aux/m4/bitcoin_subdir_to_include.m4 (0 hunks)
  • build-aux/m4/l_atomic.m4 (0 hunks)
  • cmake/module/FindQt.cmake (0 hunks)
  • configure.ac (0 hunks)
  • contrib/debian/changelog (1 hunks)
  • contrib/debian/rules (1 hunks)
  • contrib/guix/libexec/build.sh (1 hunks)
  • contrib/rpm/README.md (1 hunks)
  • contrib/rpm/bitcoin.spec (3 hunks)
  • depends/Makefile (3 hunks)
  • depends/config.site.in (1 hunks)
  • depends/funcs.mk (7 hunks)
  • depends/hosts/darwin.mk (1 hunks)
  • depends/packages/libxcb_util_cursor.mk (1 hunks)
  • depends/packages/native_qt.mk (1 hunks)
  • depends/packages/packages.mk (1 hunks)
  • depends/packages/qt.mk (2 hunks)
  • depends/packages/qt_details.mk (1 hunks)
  • depends/packages/zeromq.mk (1 hunks)
  • depends/patches/native_qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/native_qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/native_qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/native_qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/native_qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/patches/qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/qt/memory_resource.patch (0 hunks)
  • depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_qmain.patch (1 hunks)
  • depends/patches/qt/qtbase_platformsupport.patch (1 hunks)
  • depends/patches/qt/qtbase_plugins_cocoa.patch (1 hunks)
  • depends/patches/qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/toolchain.cmake.in (3 hunks)
  • doc/build-unix.md (5 hunks)
  • doc/man/Makefile.am (0 hunks)
  • libbitcoinconsensus.pc.in (0 hunks)
  • src/Makefile.am (0 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2.h (1 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2b.c (1 hunks)
  • src/init.cpp (2 hunks)
  • src/leveldb/include/leveldb/env.h (1 hunks)
  • src/leveldb/util/env.cc (1 hunks)
  • src/leveldb/util/env_posix.cc (3 hunks)
  • src/leveldb/util/env_windows.cc (3 hunks)
  • src/qt/CMakeLists.txt (8 hunks)
  • src/qt/automintmodel.cpp (2 hunks)
  • src/qt/bitcoin.cpp (4 hunks)
  • src/qt/bitcoinamountfield.cpp (1 hunks)
  • src/qt/bitcoingui.cpp (8 hunks)
  • src/qt/clientmodel.cpp (3 hunks)
  • src/qt/coincontroldialog.cpp (1 hunks)
  • src/qt/guiutil.cpp (5 hunks)
  • src/qt/notificator.cpp (3 hunks)
  • src/qt/recentrequeststablemodel.cpp (1 hunks)
  • src/qt/recentrequeststablemodel.h (1 hunks)
  • src/qt/rpcconsole.cpp (3 hunks)
  • src/qt/sendcoinsentry.cpp (2 hunks)
  • src/qt/splashscreen.cpp (1 hunks)
  • src/qt/test/CMakeLists.txt (1 hunks)
  • src/qt/transactionfilterproxy.cpp (1 hunks)
  • src/qt/transactiontablemodel.cpp (2 hunks)
  • src/qt/utilitydialog.cpp (2 hunks)
  • src/qt/winshutdownmonitor.cpp (1 hunks)
  • src/qt/winshutdownmonitor.h (1 hunks)
  • src/secp256k1/Makefile.am (0 hunks)
  • src/secp256k1/build-aux/m4/ax_jni_include_dir.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/bitcoin_secp.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/m4_ax_cxx_compile_stdcxx.m4 (0 hunks)
  • src/secp256k1/configure.ac (0 hunks)
  • src/univalue/Makefile.am (0 hunks)
  • src/univalue/autogen.sh (0 hunks)
  • src/univalue/build-aux/m4/.gitignore (0 hunks)
  • src/univalue/configure.ac (0 hunks)
💤 Files with no reviewable changes (36)
  • autogen.sh
  • build-aux/m4/l_atomic.m4
  • cmake/module/FindQt.cmake
  • src/secp256k1/build-aux/m4/m4_ax_cxx_compile_stdcxx.m4
  • build-aux/m4/bitcoin_find_bdb48.m4
  • src/univalue/configure.ac
  • Makefile.am
  • doc/man/Makefile.am
  • build-aux/m4/ax_boost_filesystem.m4
  • build-aux/m4/ax_boost_thread.m4
  • build-aux/m4/bitcoin_subdir_to_include.m4
  • build-aux/m4/ax_boost_chrono.m4
  • build-aux/m4/ax_subdirs_configure.m4
  • build-aux/m4/ax_cxx_compile_stdcxx.m4
  • depends/patches/qt/memory_resource.patch
  • build-aux/m4/ax_check_preproc_flag.m4
  • configure.ac
  • build-aux/m4/ax_boost_unit_test_framework.m4
  • build-aux/m4/ax_check_compile_flag.m4
  • src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4
  • build-aux/m4/ax_pthread.m4
  • src/univalue/build-aux/m4/.gitignore
  • build-aux/m4/ax_boost_system.m4
  • build-aux/m4/ax_boost_base.m4
  • build-aux/m4/bitcoin_qt.m4
  • libbitcoinconsensus.pc.in
  • src/secp256k1/build-aux/m4/bitcoin_secp.m4
  • src/univalue/Makefile.am
  • build-aux/m4/ax_check_link_flag.m4
  • src/univalue/autogen.sh
  • build-aux/m4/ax_gcc_func_attribute.m4
  • src/secp256k1/Makefile.am
  • src/secp256k1/configure.ac
  • src/secp256k1/build-aux/m4/ax_jni_include_dir.m4
  • build-aux/m4/ax_boost_program_options.m4
  • src/Makefile.am
🧰 Additional context used
🧬 Code graph analysis (9)
src/qt/clientmodel.cpp (1)
src/chainparams.cpp (4)
  • Params (1307-1310)
  • Params (1307-1307)
  • Params (1312-1324)
  • Params (1312-1312)
src/leveldb/util/env.cc (1)
src/init.cpp (2)
  • Shutdown (234-346)
  • Shutdown (234-234)
src/leveldb/util/env_posix.cc (1)
src/leveldb/util/env_windows.cc (1)
  • shutdown_requested_ (680-683)
src/crypto/MerkleTreeProof/blake2/blake2.h (1)
src/crypto/MerkleTreeProof/blake2/blake2b.c (9)
  • blake2b_init (102-128)
  • blake2b_init_key (130-175)
  • blake2b_init_param (84-99)
  • blake2b_update (290-328)
  • blake2b_final (371-399)
  • blake2b (432-468)
  • blake2b_long (471-527)
  • blake2b_4r_update (330-368)
  • blake2b_4r_final (401-429)
src/leveldb/include/leveldb/env.h (2)
src/init.cpp (2)
  • Shutdown (234-346)
  • Shutdown (234-234)
src/leveldb/util/env.cc (2)
  • Shutdown (90-90)
  • Shutdown (90-90)
src/qt/winshutdownmonitor.h (1)
src/qt/winshutdownmonitor.cpp (2)
  • nativeEventFilter (19-54)
  • nativeEventFilter (19-19)
src/leveldb/util/env_windows.cc (1)
src/leveldb/util/env_posix.cc (1)
  • shutdown_requested_ (732-735)
src/init.cpp (2)
src/leveldb/util/env_posix.cc (2)
  • Default (911-914)
  • Default (911-911)
src/leveldb/util/env_windows.cc (2)
  • Default (854-857)
  • Default (854-854)
src/qt/notificator.cpp (1)
src/qt/bitcoin.cpp (1)
  • Q_DECLARE_METATYPE (90-90)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: build-guix-x86_64-w64-mingw32
  • GitHub Check: build-guix-aarch64-linux-gnu
  • GitHub Check: build-guix-arm64-apple-darwin
  • GitHub Check: build-guix-x86_64-apple-darwin
  • GitHub Check: build-linux-cmake
  • GitHub Check: build-mac-cmake
  • GitHub Check: build-guix-x86_64-linux-gnu
  • GitHub Check: build-windows-cmake
  • GitHub Check: build
🔇 Additional comments (66)
src/qt/bitcoinamountfield.cpp (1)

125-125: LGTM! Correct Qt6 deprecation fix.

Removing the .expandedTo(QApplication::globalStrut()) call is necessary because QApplication::globalStrut() was deprecated in Qt5 and removed in Qt6. The global strut concept was rarely used and typically returned (0, 0), so this change should have minimal behavioral impact while ensuring Qt6 compatibility.

src/leveldb/util/env.cc (1)

90-91: LGTM: Base implementation is appropriate.

The empty default implementation of Shutdown() is correct. Platform-specific implementations (PosixEnv, WindowsEnv) override this to signal their background threads to terminate.

src/init.cpp (2)

45-45: LGTM: Include added for Env interface.

The include is necessary to call Env::Default()->Shutdown() at line 344.


344-344: LGTM: Shutdown placement is appropriate.

Calling leveldb::Env::Default()->Shutdown() at this point in the shutdown sequence is correct. All major subsystems (network, validation, databases, wallets) have been stopped or cleaned up, and LevelDB background threads can now safely terminate.

src/leveldb/include/leveldb/env.h (1)

190-192: LGTM: Clear method declaration.

The virtual Shutdown() method is properly declared with a clear comment indicating its purpose.

src/leveldb/util/env_windows.cc (3)

680-683: LGTM: Standard shutdown signaling pattern.

The implementation correctly sets the atomic shutdown_requested_ flag and signals the condition variable to wake the background thread. This is a thread-safe shutdown pattern.


709-709: LGTM: Proper atomic flag declaration.

Using std::atomic<bool> initialized to false is appropriate for coordinating shutdown between threads.


777-780: LGTM: Clean thread exit on shutdown.

The background thread properly checks the shutdown flag and exits by releasing the mutex and returning. This ensures the thread terminates gracefully when shutdown is requested.

src/leveldb/util/env_posix.cc (3)

732-735: LGTM: Thread-safe shutdown signaling.

The implementation matches the Windows version and correctly uses the atomic flag with condition variable signaling to coordinate shutdown. The pattern is thread-safe and standard.


768-768: LGTM: Atomic flag for shutdown coordination.

The atomic boolean properly coordinates shutdown between the calling thread and the background worker thread.


827-830: LGTM: Graceful thread termination.

The background thread correctly checks the shutdown flag and exits cleanly by releasing the mutex and returning. This ensures proper cleanup during application shutdown.

depends/packages/zeromq.mk (1)

17-17: LGTM! Improved shell variable quoting.

Adding quotes around $(LIBRARY_PATH) when backing it up is a defensive improvement that prevents potential issues if the path contains spaces or special characters, which can occur on macOS. This change makes the variable assignments consistently quoted and follows shell scripting best practices.

src/qt/recentrequeststablemodel.h (1)

31-40: LGTM!

The migration from toTime_t() / fromTime_t() to toSecsSinceEpoch() / fromSecsSinceEpoch() is the correct Qt6 API upgrade. These deprecated Qt5 methods were removed in Qt6, and the replacement methods provide equivalent functionality for Unix epoch time handling.

src/qt/transactionfilterproxy.cpp (1)

15-17: LGTM!

The MIN_DATE and MAX_DATE constants are correctly updated to use QDateTime::fromSecsSinceEpoch() instead of the Qt5-deprecated fromTime_t(). The numeric values remain equivalent, ensuring consistent date range behavior.

src/qt/sendcoinsentry.cpp (2)

19-20: LGTM!

Adding the QRegularExpression include is necessary for the Qt6 migration, as QRegExp was removed in Qt6.


88-88: LGTM!

Replacing QRegExp with QRegularExpression is the correct Qt6 migration. The regex pattern [\\x00-\\x1F\\x7F] remains unchanged, preserving the control character sanitization logic.

depends/patches/qt/rcc_hardcode_timestamp.patch (1)

9-21: LGTM!

Hardcoding the RCC timestamp to 1 and removing environment variable dependencies (QT_RCC_SOURCE_DATE_OVERRIDE and SOURCE_DATE_EPOCH) ensures reproducible builds. This is a standard practice in deterministic build systems and aligns with the stated goal of making the Qt package reusable across different build configurations.

depends/patches/native_qt/dont_hardcode_pwd.patch (1)

1-51: LGTM!

Replacing hardcoded /bin/pwd with pwd improves portability for systems that don't follow the Filesystem Hierarchy Standard (FHS), such as Guix. The command will be resolved through the normal PATH search mechanism, which is the standard practice for shell scripts.

depends/patches/qt/qtbase_plugins_cocoa.patch (1)

1-21: LGTM!

The patch adds a necessary workaround for CMake issue 23464 when building the Cocoa plugin on macOS with CMake versions older than 3.25 and without session manager support. The condition is specific and well-documented, with a reference to the upstream Qt code review.

src/qt/rpcconsole.cpp (4)

514-523: Event forwarding logic is correct.

The explicit QKeyEvent construction for Return/Enter keys follows the same pattern as the PageUp/PageDown handling. The control flow and event forwarding behavior remain equivalent to the original implementation.


534-542: Default key handling updated correctly.

The explicit QKeyEvent construction for the default case (typing in messages widget) maintains the same forwarding behavior. All required event properties (type, key, modifiers, text, autoRepeat, count) are preserved.


1157-1167: LGTM!

The node banning logic correctly retrieves node statistics by ID and applies the ban. The code structure is clear and the error handling with the early return on line 1160 is appropriate.


499-507: Qt6 QKeyEvent constructor usage is correct. The parameters (type, key, modifiers, text, autorep, count) match Qt6’s QKeyEvent signature, so no changes are needed.

depends/patches/qt/qtbase_avoid_native_float16.patch (1)

16-35: Disable-native-f16 approach looks fine; consider future gating

LGTM for stability. When distro toolchains are ≥ GCC 12 (or unaffected toolchains), consider gating this instead of forcing the fallback globally to regain perf on capable platforms. Keep an eye on patch applicability when bumping Qt.

Can you confirm our supported builders (Linux/CI images) still require this patch and note in release notes when it can be dropped?

depends/config.site.in (1)

65-67: Switch to qt6_debug looks consistent

Looks good and consistent with the Qt6 move.

depends/packages/libxcb_util_cursor.mk (1)

2-6: Verify source URL and hash

Version, URL, and sha256 look plausible. Please verify the hash against the upstream tarball to avoid supply-chain surprises.

src/qt/test/CMakeLists.txt (1)

35-36: LGTM! Consistent Qt6 migration.

The test target linkage correctly updates from Qt5::Test and Qt5::Widgets to their Qt6 equivalents, aligning with the broader Qt6 migration across the project.

contrib/rpm/bitcoin.spec (3)

12-12: LGTM! Qt6 build configuration for RPM.

The buildargs correctly updates to --with-gui=qt6, aligning with the Qt6 migration across packaging and build systems.


70-72: LGTM! Qt6 build dependencies.

BuildRequires correctly updated from Qt5 (qt5-qtbase-devel, qt5-linguist) to Qt6 (qt6-qtbase-devel, qt6-linguist) equivalents, consistent with the RPM packaging Qt6 migration.


432-433: LGTM! Changelog documents Qt6 default.

The changelog entry appropriately documents the change to default Qt6 for the Qt package, providing clear communication to package maintainers and users.

src/qt/recentrequeststablemodel.cpp (1)

245-245: LGTM! Qt6 date/time API migration.

The Date column comparison correctly migrates from the deprecated toTime_t() to toSecsSinceEpoch(), consistent with Qt6 requirements. The comparison logic remains semantically equivalent.

contrib/debian/rules (1)

15-15: LGTM! Debian packaging Qt6 migration.

The QT variable now derives qt6 instead of qt5, aligning Debian packaging with the Qt6 migration. The dpkg-vendor logic (Ubuntu → qt4, otherwise → qt6) remains consistent with the packaging strategy.

depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (1)

10-14: LGTM! Qt moc macro handling fix.

The patch correctly adds handling for GCC's internal _GLIBCXX_VISIBILITY macro by treating it as a dummy variadic function macro, consistent with the existing patterns for __attribute__ and __declspec. This aligns with Qt6 moc tooling requirements and addresses the upstream issue (QTBUG-83160).

src/qt/coincontroldialog.cpp (1)

681-681: LGTM! Qt6 tristate flag update.

The flag correctly migrates from Qt::ItemIsTristate to Qt::ItemIsUserTristate, aligning with Qt6 API changes. This maintains the tristate checkbox behavior while using the Qt6-compliant flag for user-initiated state changes.

src/qt/transactiontablemodel.cpp (2)

756-756: LGTM! Qt6 date/time API migration for DateRole.

The DateRole data correctly migrates from the deprecated QDateTime::fromTime_t() to QDateTime::fromSecsSinceEpoch(), consistent with Qt6 requirements. The conversion remains semantically equivalent.


785-785: LGTM! Qt6 date/time API migration for TxPlainTextRole.

The date construction correctly migrates from the deprecated QDateTime::fromTime_t() to QDateTime::fromSecsSinceEpoch(), aligning with Qt6 API updates. The conversion logic remains unchanged.

depends/packages/packages.mk (3)

6-6: LGTM! Qt6 Linux dependencies.

The addition of libxcb_util_cursor to qt_linux_packages adds a required dependency for Qt6 on Linux platforms, supporting the cursor functionality in the Qt6 build infrastructure.


7-7: LGTM! FreeBSD Qt packaging alignment.

Defining qt_freebsd_packages as a copy of qt_linux_packages appropriately aligns FreeBSD Qt dependencies with Linux, simplifying the Qt6 packaging across Unix-like platforms.


10-12: LGTM! Native Qt for cross-compilation.

The conditional inclusion of native_qt in qt_native_packages when host != build correctly handles the cross-compilation scenario where native Qt tools are needed on the build platform. This is essential for Qt6's build tooling (moc, rcc, uic, etc.).

CMakeLists.txt (2)

248-250: LGTM! Qt6 version requirement updated correctly.

The Qt package requirement has been successfully upgraded from Qt 5.11.3 to Qt 6.7.3 MODULE REQUIRED, which aligns with the PR's migration objective.


87-89: Verify C++ standard version.

The AI summary mentions updating C++ standard from c++17 to c++20, but the code still shows CMAKE_CXX_STANDARD 17. Please confirm whether this is intentional or if the C++ standard update is pending.

src/qt/utilitydialog.cpp (2)

27-27: LGTM! Correct Qt6 migration.

The switch from QRegExp to QRegularExpression is the correct approach for Qt6, as QRegExp was deprecated and removed in Qt6.


58-59: LGTM! Non-greedy regex pattern is correct.

The non-greedy regex pattern "<(.*?)>" correctly extracts URLs while the replace method properly converts them to clickable HTML links. The pattern matches Qt6's QRegularExpression API correctly.

depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch (1)

1-17: LGTM! Documented workaround for Qt moc issue.

This patch adds _GLIBCXX_VISIBILITY to the list of ignored macros in Qt's moc tool, similar to the existing handling of __attribute__ and __declspec__. The patch addresses a documented upstream issue (QTBUG-83160) where moc incorrectly processes GCC internal macros when scanning headers on CPLUS_INCLUDE_PATH.

src/qt/clientmodel.cpp (3)

167-171: LGTM! Correct Qt6 time API migration.

The migration from deprecated QDateTime::fromTime_t to QDateTime::fromSecsSinceEpoch is correct for Qt6. Both calls properly convert Unix timestamps to QDateTime for the chain tip and genesis block times.


289-289: LGTM! Consistent time API usage.

The startup time conversion correctly uses fromSecsSinceEpoch, maintaining consistency with other time conversions in this file.


374-374: LGTM! Block tip notification time conversion updated.

The time conversion for block tip notifications has been properly updated to use fromSecsSinceEpoch, ensuring compatibility with Qt6.

contrib/guix/libexec/build.sh (2)

368-378: LGTM! Darwin environment cleanup improved.

The conditional now correctly applies to all Darwin hosts (not just x86_64), and the additional unsetting of CC, CXX, and CPP prevents potential conflicts with system compilers. This ensures a clean build environment for macOS cross-compilation.


383-383: LGTM! Proper environment propagation for CMake.

The addition of environment variable propagation (CFLAGS, CXXFLAGS, OBJCXXFLAGS, PKG_CONFIG_PATH, LDFLAGS) is essential for the CMake-based build system to correctly locate and link against dependencies. The PKG_CONFIG_PATH prepending ensures Qt6 and other libraries are discovered properly.

depends/patches/qt/qtbase_platformsupport.patch (1)

1-34: LGTM! Well-documented Qt6 platform support fix.

This patch correctly addresses the issue where disabling certain input features (-no-feature-evdev, -no-feature-tslib, -no-feature-libinput) would create an empty InputSupportPrivate module, triggering CMake issues. The expanded condition now properly checks for vxworksevdev and the libinput+xkbcommon combination, preventing the empty module creation. The patch is well-documented with upstream references (Qt code review 633612 and CMake issue 23464).

src/qt/winshutdownmonitor.cpp (1)

19-19: LGTM! Correct Qt6 native event filter signature.

The parameter type change from long* to qintptr* is required for Qt6 compatibility. qintptr is Qt's cross-platform pointer-sized integer type, ensuring the signature matches QAbstractNativeEventFilter::nativeEventFilter correctly on both 32-bit and 64-bit Windows systems.

Dockerfile (2)

7-7: LGTM! CMake dependency added.

The addition of cmake to the build dependencies is correct for the migration from Autotools to CMake-based builds.


22-25: LGTM! Complete CMake workflow migration.

The Dockerfile successfully migrates from Autotools (autogen.sh, ./configure, make) to a modern CMake workflow:

  1. cmake -B build configures with the depends toolchain
  2. cmake --build build compiles the project
  3. make test runs tests in the build directory
  4. cmake --install installs to the correct prefix

The configuration correctly disables GUI (-DBUILD_GUI=OFF) and enables tests (-DBUILD_TESTS=ON) for the Docker containerized environment.

src/qt/winshutdownmonitor.h (1)

21-21: Qt6-nativeEventFilter signature update looks good

Using qintptr* aligns with Qt6. No further changes needed.

depends/Makefile (1)

50-51: Build system changes LGTM

  • c++20 default is appropriate for Qt6.
  • Inclusion of qt_native_packages_ and new install prereqs look correct.

Also applies to: 172-173, 265-276

src/qt/bitcoingui.cpp (1)

462-464: LGTM: updated key sequences and epoch usage

  • Console/debug shortcuts use bitwise modifiers properly.
  • Using QDateTime::fromSecsSinceEpoch for header tip time is correct with Qt6.

Also applies to: 554-555

depends/packages/qt_details.mk (1)

1-26: Confirm Qt6 artifacts and hashes

Please verify download URLs resolve and these SHA256 hashes match upstream for 6.7.3 (qtbase, qttools, qttranslations; and top-level cmake files).

You can sanity-check quickly with:

depends/patches/qt/qtbase_avoid_qmain.patch (1)

17-19: Validate Windows entrypoint behavior after removing QT_NEEDS_QMAIN

Looks reasonable, but please verify there are no remaining references to QT_NEEDS_QMAIN or assumptions about qMain() in the tree, and that Windows builds link as expected (MinGW).

Run:

depends/funcs.mk (1)

217-221: PKG_CONFIG_SYSROOT_DIR=/ may mis-resolve pc paths during cross builds.

SYSROOT “/” can break -I/-L expansions from .pc files. Prefer the actual sysroot/prefix.

Suggest:

-$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=/
+$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=$($($(1)_type)_prefix)

Please confirm cross builds (e.g., mingw, aarch64-darwin) still resolve pkg-config paths correctly.

src/qt/CMakeLists.txt (1)

18-25: Verify plugin target names exist in your Qt6 (notably QModernWindowsStylePlugin).

If not built/available, qt6_import_plugins will fail to resolve targets.

Please confirm these targets are present in your Qt6 toolchain (Widgets built with styles on Windows/macOS).

depends/packages/qt.mk (1)

12-22: Ensure $(package)_patches_path is respected throughout depends.

You set $(package)_patches_path here, but funcs.mk currently uses $(PATCHES_PATH)/$(1). Update funcs.mk to honor $(1)_patches_path for both recipe hashing and patch copying.

This is required for qttools_skip_dependencies.patch and others to apply. See suggested fix in depends/funcs.mk Lines 75-79.

src/qt/automintmodel.cpp (1)

95-97: Use size_t and < for indexing vout to avoid signed/width pitfalls.

[ suggest_optional_refactor ]

-            for (uint32_t i = 0; i != it->second.tx->vout.size(); ++i) {
+            for (size_t i = 0; i < it->second.tx->vout.size(); ++i) {
README.md (1)

242-247: Packaging example likely outdated.

Verify the installer filename/version and whether --prefix=/usr/bin is intended (system-wide installs usually use /usr).

If incorrect, update the example to the new CPack output name and recommended install prefix.

depends/packages/native_qt.mk (3)

48-59: Static linking for native Qt tools can fail on macOS; gate -static.

[ suggest_recommended_refactor ]

-$(package)_config_opts += -static
+ifeq ($(build_os),linux)
+$(package)_config_opts += -static
+endif

133-141: Patch dir var mismatch: _patches_path set but _patch_dir used.

Ensure the path used here matches the variable you set (or rely on the depends framework’s default). As written, this may point to the wrong directory.

Either set $(package)_patch_dir := $(qt_details_patches_path) or use $(package)_patches_path consistently here.


147-154: Build/stage likely targeting wrong directory.

After cd qtbase && ./configure -top-level ..., the CMake build tree isn’t guaranteed to be “.”. Safer to build/install from the generated build dir or explicitly from qtbase.

Option A (simple): drive build/install from qtbase:

-define $(package)_build_cmds
-  cmake --build . -- $$(filter -j%,$$(MAKEFLAGS))
-endef
+define $(package)_build_cmds
+  cmake --build qtbase -- $$(filter -j%,$$(MAKEFLAGS))
+endef
@@
-define $(package)_stage_cmds
-  cmake --install . --prefix $($(package)_staging_prefix_dir)
-endef
+define $(package)_stage_cmds
+  cmake --install qtbase --prefix $($(package)_staging_prefix_dir)
+endef

Please confirm where configure -top-level emits the build directory in your environment; adjust paths accordingly.

Comment on lines +75 to 78
The RPM spec file will by default build the GUI client linked against the Qt6
libraries. If you wish instead to link against the Qt4 libraries you need to
pass the switch `-D '_use_qt4 1'` at build time to the `rpmbuild` or `mock`
command used to build the packages.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Update legacy Qt version reference from Qt4 to Qt5.

The documentation mentions Qt4 as the legacy alternative, but the PR migrates from Qt5 to Qt6. Line 76 should reference Qt5 instead of Qt4 to accurately reflect the migration path and available build options.

Apply this diff to correct the documentation:

-The RPM spec file will by default build the GUI client linked against the Qt6
-libraries. If you wish instead to link against the Qt4 libraries you need to
-pass the switch `-D '_use_qt4 1'` at build time to the `rpmbuild` or `mock`
-command used to build the packages.
+The RPM spec file will by default build the GUI client linked against the Qt6
+libraries. If you wish instead to link against the Qt5 libraries you need to
+pass the switch `-D '_use_qt5 1'` at build time to the `rpmbuild` or `mock`
+command used to build the packages.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
The RPM spec file will by default build the GUI client linked against the Qt6
libraries. If you wish instead to link against the Qt4 libraries you need to
pass the switch `-D '_use_qt4 1'` at build time to the `rpmbuild` or `mock`
command used to build the packages.
The RPM spec file will by default build the GUI client linked against the Qt6
libraries. If you wish instead to link against the Qt5 libraries you need to
pass the switch `-D '_use_qt5 1'` at build time to the `rpmbuild` or `mock`
command used to build the packages.
🤖 Prompt for AI Agents
In contrib/rpm/README.md around lines 75 to 78, the doc currently instructs
passing "-D '_use_qt4 1'" to build against legacy Qt4, but the project migrated
from Qt5 to Qt6 so this should reference Qt5 instead; update the text to
instruct passing "-D '_use_qt5 1'" (or otherwise replace "Qt4" with "Qt5") so
the legacy alternative correctly reflects Qt5 and matches the PR migration.

Comment on lines +103 to +110
define $(package)_fetch_cmds
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_top_download_path),$($(package)_top_cmakelists_download_file),$($(package)_top_cmakelists_file_name)-$($(package)_version),$($(package)_top_cmakelists_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_ecmoptionaladdsubdirectory_download_file),$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version),$($(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_qttoplevelhelpers_download_file),$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version),$($(package)_top_cmake_qttoplevelhelpers_sha256_hash))
endef
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Undefined var $(package)_download_file breaks fetch. Use _file_name.

-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \
🤖 Prompt for AI Agents
In depends/packages/native_qt.mk around lines 103 to 110, the fetch rule uses an
undefined variable $(package)_download_file which breaks fetching; change that
reference to $(package)_file_name (i.e., use the actual file-name variable) so
the first fetch_file call matches the pattern used by the other calls; ensure no
other occurrences of _download_file remain in this define.

Comment on lines 101 to 103
$(package)_config_opts += -system-zlib
$(package)_config_opts += -qt-zlib
$(package)_config_opts += -static
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Conflicting zlib options: choose one.

Both -system-zlib and -qt-zlib are set; keep only one (recommend system).

Apply this diff:

 $(package)_config_opts += -system-zlib
-$(package)_config_opts += -qt-zlib
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$(package)_config_opts += -system-zlib
$(package)_config_opts += -qt-zlib
$(package)_config_opts += -static
$(package)_config_opts += -system-zlib
$(package)_config_opts += -static
🤖 Prompt for AI Agents
In depends/packages/qt.mk around lines 101 to 103, there is a conflict between
zlib options: both -system-zlib and -qt-zlib are added; remove the -qt-zlib
entry and keep -system-zlib (recommended) so only one zlib source is specified,
ensuring the remaining -system-zlib and -static options stay; update the file to
delete the line that adds -qt-zlib.

Comment on lines +497 to +502
// Delay shutdown signal by 500 milliseconds
QTimer::singleShot(1000, this, [this]() {
// Request shutdown from core thread after delay
Q_EMIT requestedShutdown();
});
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix comment/timeout mismatch; consider a named constant for clarity

Comment says 500ms but code uses 1000ms. Align them and consider a constexpr for the delay.

Apply:

-    // Delay shutdown signal by 500 milliseconds
-    QTimer::singleShot(1000, this, [this]() {
+    // Delay shutdown signal by 1000 milliseconds
+    QTimer::singleShot(1000, this, [this]() {
         // Request shutdown from core thread after delay
         Q_EMIT requestedShutdown();
     });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Delay shutdown signal by 500 milliseconds
QTimer::singleShot(1000, this, [this]() {
// Request shutdown from core thread after delay
Q_EMIT requestedShutdown();
});
}
// Delay shutdown signal by 1000 milliseconds
QTimer::singleShot(1000, this, [this]() {
// Request shutdown from core thread after delay
Q_EMIT requestedShutdown();
});
}
🤖 Prompt for AI Agents
In src/qt/bitcoin.cpp around lines 497 to 502, the comment states a 500ms delay
but the code calls QTimer::singleShot(1000, ...), so make them consistent and
clearer by introducing a named constant (e.g. constexpr int kShutdownDelayMs =
500) and use that constant in the QTimer::singleShot call, then update the
comment to reference the constant/actual milliseconds; ensure the constant is
appropriately scoped and immutable.

Comment on lines +504 to 506
void BitcoinApplication::showCloseWindow(){
shutdownWindow->show();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Guard showCloseWindow() against null (or make it private)

showCloseWindow() dereferences shutdownWindow unconditionally. If called before requestShutdown(), it will crash. Either make it private and call only after shutdownWindow.reset(...) or guard it and create the window if needed.

Example:

-void BitcoinApplication::showCloseWindow(){
-    shutdownWindow->show();
-}
+void BitcoinApplication::showCloseWindow() {
+    if (!shutdownWindow) {
+        shutdownWindow.reset(ShutdownWindow::showShutdownWindow(window));
+    }
+    shutdownWindow->show();
+}

Optionally move the declaration to private to avoid misuse.

Also applies to: 233-234, 480-482

🤖 Prompt for AI Agents
In src/qt/bitcoin.cpp around lines 504-506 (also review related spots at 233-234
and 480-482), showCloseWindow() currently dereferences shutdownWindow
unconditionally which can crash if it's null; either make showCloseWindow() a
private method and only call it after shutdownWindow has been initialized by
requestShutdown(), or add a null-check that safely constructs or shows
shutdownWindow (or returns) when shutdownWindow is null; update the
declaration/usage accordingly so external callers cannot invoke it before
shutdownWindow is set.

Comment on lines +57 to 74
# Generate QM files from TS files
file(GLOB TS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/locale/*.ts")
set(LOCALE_BUILD_DIR "${CMAKE_BINARY_DIR}/src/qt/locale")
file(MAKE_DIRECTORY ${LOCALE_BUILD_DIR})
foreach(TS_FILE ${TS_FILES})
get_filename_component(TS_NAME ${TS_FILE} NAME_WE)
set(QM_FILE "${LOCALE_BUILD_DIR}/${TS_NAME}.qm")
add_custom_command(
OUTPUT ${QM_FILE}
COMMAND Qt6::lrelease ${TS_FILE} -qm ${QM_FILE}
DEPENDS ${TS_FILE}
COMMENT "Generating ${TS_NAME}.qm in build directory"
)
list(APPEND QM_FILES ${QM_FILE})
endforeach()

add_custom_target(translations ALL DEPENDS ${QM_FILES})

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add LinguistTools to ensure Qt6 translation tools targets exist.

Qt6::{lrelease,lupdate,lconvert} require find_package(Qt6 COMPONENTS LinguistTools).

Add near the top (once per directory scope):

find_package(Qt6 COMPONENTS LinguistTools REQUIRED)

If already done at a higher scope, ignore. Otherwise CMake will error on unknown targets.

Also applies to: 396-407

🤖 Prompt for AI Agents
In src/qt/CMakeLists.txt around lines 57 to 74 (and also applicable to lines 396
to 407), the CMake rules invoke Qt6::lrelease/lupdate/lconvert but do not ensure
the LinguistTools targets are available; add a find_package(Qt6 COMPONENTS
LinguistTools REQUIRED) near the top of this CMakeLists.txt (or ensure it is
present in a parent scope) so the Qt6 translation tool targets exist before you
reference Qt6::lrelease and friends.

Comment on lines +100 to 101
return dateTimeStr(QDateTime::fromSecsSinceEpoch((qint32)nTime));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Avoid 32‑bit cast in fromSecsSinceEpoch (Y2038 risk)

Casting nTime to qint32 truncates values beyond 2038. Qt6 supports 64‑bit epoch directly.

Apply:

-    return dateTimeStr(QDateTime::fromSecsSinceEpoch((qint32)nTime));
+    return dateTimeStr(QDateTime::fromSecsSinceEpoch(nTime));
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
return dateTimeStr(QDateTime::fromSecsSinceEpoch((qint32)nTime));
}
return dateTimeStr(QDateTime::fromSecsSinceEpoch(nTime));
}
🤖 Prompt for AI Agents
In src/qt/guiutil.cpp around lines 100 to 101, the code casts nTime to qint32
before calling QDateTime::fromSecsSinceEpoch which truncates values past 2038;
change the call to use a 64-bit value instead (e.g. pass nTime as qint64 or
static_cast<qint64>(nTime)) so QDateTime::fromSecsSinceEpoch receives a 64-bit
epoch and no longer risks Y2038 truncation.

@aleflm aleflm force-pushed the dev-aleflm-update-qt6-rebased branch from c514efa to 5e7cdbf Compare October 20, 2025 09:16
@aleflm aleflm force-pushed the dev-aleflm-update-qt6-rebased branch from 5e7cdbf to 212ce38 Compare October 20, 2025 11:12
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
depends/patches/qt/rcc_hardcode_timestamp.patch (1)

9-21: Remove or skip this patch for Qt 6.7.3—Qt 6 natively supports reproducible builds via environment variables.

Qt 5.11+ (including Qt 6) supports the QT_RCC_SOURCE_DATE_OVERRIDE environment variable for reproducible builds, yet this patch removes that support and hardcodes lastmod = quint64(1) instead. This approach is counterproductive:

  1. Unnecessary: Qt 6.7.3 already provides native reproducible build support through environment variables
  2. Inflexible: Hardcoding to timestamp 1 removes the ability to configure the RCC timestamp
  3. Non-standard: The proper approach is to set QT_RCC_SOURCE_DATE_OVERRIDE or SOURCE_DATE_EPOCH at build time, not patch the source

This patch appears to be legacy code from Qt 5 that should not be applied to Qt 6. Either remove it or verify it's being conditionally skipped for Qt 6 builds.

src/qt/bitcoingui.cpp (1)

307-315: Broken shortcuts: "Alt+%1" builds “Alt+49” etc. Use key combinations, not stringified keycodes.

Qt::Key_1 is 49; QString("Alt+%1").arg(key++) yields “Alt+49”, which Qt doesn't parse. Shortcuts won’t trigger.

Apply:

-    size_t key = Qt::Key_1;
+    int key = Qt::Key_1;

-    overviewAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
+    overviewAction->setShortcut(QKeySequence(Qt::ALT | key++));

-    sendCoinsAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
+    sendCoinsAction->setShortcut(QKeySequence(Qt::ALT | key++));

-    receiveCoinsAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
+    receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT | key++));

-    historyAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
+    historyAction->setShortcut(QKeySequence(Qt::ALT | key++));

For Lelantus and Masternodes:

-    lelantusAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
+    lelantusAction->setShortcut(QKeySequence(Qt::ALT | key++));

-#ifdef Q_OS_MAC
-    masternodeAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
-#else
-    masternodeAction->setShortcut(QKeySequence(QString("Alt+%1").arg(key++)));
-#endif
+    masternodeAction->setShortcut(QKeySequence(Qt::ALT | key++));

Qt6 alternative (clearer):

-    overviewAction->setShortcut(QKeySequence(QString("Alt+%1").arg(Qt::Key_1)));
+    overviewAction->setShortcut(QKeySequence(QKeyCombination{Qt::ALT, Qt::Key_1}));

Also applies to: 317-323, 328-334, 339-345, 347-353, 361-366

README.md (1)

179-181: Fix GUI run path.

Artifacts land in build/bin; the example points to ./bin.

-./bin/firo-qt
+build/bin/firo-qt
♻️ Duplicate comments (17)
depends/patches/qt/qtbase_skip_tools.patch (1)

16-17: CRITICAL: Removal of qt_internal_create_wrapper_scripts() breaks downstream Qt module builds.

This issue was previously flagged and remains unresolved. The wrapper scripts (qt-cmake, qt-configure-module, etc.) are essential for configuring downstream Qt modules like qttools and qttranslations. Without these scripts, the CMake configuration for those modules will fail.

Required action: Restore the qt_internal_create_wrapper_scripts() call on line 17 (before the add_library(Qt::GlobalConfig ALIAS GlobalConfig) line).

Apply this diff to restore the wrapper script generation:

 qt_generate_qmake_and_qtpaths_wrapper_for_target()
 
+# Depends on the global features being evaluated.
+qt_internal_create_wrapper_scripts()
+
 add_library(Qt::GlobalConfig ALIAS GlobalConfig)
src/qt/notificator.cpp (1)

149-152: Compile error: qDBusRegisterMetaType returns int; remove .id().

Return the int directly; current code won’t compile.

Minimal fix:

-int FreedesktopImage::metaType()
-{
-    return qDBusRegisterMetaType<FreedesktopImage>().id();
-}
+int FreedesktopImage::metaType()
+{
+    return qDBusRegisterMetaType<FreedesktopImage>();
+}

Optional clarity refactor (rename to void-returning API and update call site):

-    static int metaType();
+    static void registerMetaType();
-int FreedesktopImage::metaType()
-{
-    return qDBusRegisterMetaType<FreedesktopImage>();
-}
+void FreedesktopImage::registerMetaType()
+{
+    qDBusRegisterMetaType<FreedesktopImage>();
+}
-        FreedesktopImage::metaType();
+        FreedesktopImage::registerMetaType();
depends/funcs.mk (3)

304-304: Update patch copying to use $(1)_patches_path.

This line hardcodes $(PATCHES_PATH)/$(1), which is part of the same critical issue flagged at lines 75-79. When fixing the recipe hash calculation, this patch-copying logic must also be updated.

Include this change when applying the patch-path fix:

-	$(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
+	$(AT)$(foreach patch,$($(1)_patches),cd $($(1)_patches_path); cp $(patch) $($(1)_patch_dir) ;)

63-73: The commented implementation fixes the critical patch-path issue below.

This commented-out version correctly uses $(1)_patches_path with a fallback default and supports local directories—addressing the hardcoded $(PATCHES_PATH)/$(1)/ issue flagged in the past review (lines 75-79).

If local source support isn't needed for Qt 6, at minimum uncomment the patches_path logic and apply it to lines 75-79.

Apply this minimal fix to line 75-79:

 define int_get_build_recipe_hash
+$(eval $(1)_patches_path?=$(PATCHES_PATH)/$(1))
-$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1))
+$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $($(1)_patches_path)/,$($(1)_patches)) | cut -d" " -f1))
 final_build_id_long+=:[$(1)_all_file_checksums]$(foreach checksum,$($(1)_all_file_checksums),$(shell echo ":$(checksum)")):
 $(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
 endef

83-92: Critical: Restore initialization of $(1)_all_dependencies.

Lines 84-85 are commented out, but line 86, 87, and 90 all depend on $(1)_all_dependencies being initialized. This breaks the dependency graph: build IDs will be incomplete, and dependencies won't be unpacked during the configure step (line 309).

Uncomment the appropriate initialization:

 $(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
-# $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($(1)_dependencies)))
-# $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
+$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
 $(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))
 $(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id_string))
-# $(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id))
contrib/rpm/README.md (1)

75-78: Update legacy Qt version reference from Qt4 to Qt5.

The documentation mentions Qt4 as the legacy alternative, but the PR migrates from Qt5 to Qt6. Line 76-77 should reference Qt5 instead of Qt4 to accurately reflect the migration path and available build options.

Apply this diff to correct the documentation:

-The RPM spec file will by default build the GUI client linked against the Qt6
-libraries. If you wish instead to link against the Qt4 libraries you need to
-pass the switch `-D '_use_qt4 1'` at build time to the `rpmbuild` or `mock`
-command used to build the packages.
+The RPM spec file will by default build the GUI client linked against the Qt6
+libraries. If you wish instead to link against the Qt5 libraries you need to
+pass the switch `-D '_use_qt5 1'` at build time to the `rpmbuild` or `mock`
+command used to build the packages.
src/qt/guiutil.cpp (1)

98-101: Remove 32‑bit cast in fromSecsSinceEpoch (Y2038 risk).

Pass a 64‑bit epoch; Qt6 handles it directly.

-    return dateTimeStr(QDateTime::fromSecsSinceEpoch((qint32)nTime));
+    return dateTimeStr(QDateTime::fromSecsSinceEpoch(static_cast<qint64>(nTime)));
src/qt/automintmodel.cpp (1)

61-67: Fix lock‑failure starvation and wrong wallet instance.

  • On TRY_LOCK failures you requeue and return without re‑arming the timer and without clearing the 120s throttle. Processing can stall until another external event.
  • Calling AvailableCoinsForLMint on pwalletMain is wrong when using the instance wallet.

Apply:

-        if (txs.empty() || (lastUpdateTime != 0 && (now - lastUpdateTime <= 120))) {
+        if (txs.empty() || (lastUpdateTime != 0 && (now - lastUpdateTime <= 120))) {
             return;
         }
-
-        lastUpdateTime = now;
         batch.swap(txs);
     }
@@
-        TRY_LOCK(cs_main, lock_main);
+        TRY_LOCK(cs_main, lock_main);
         if (!lock_main) {
             // Put back batch if we couldn't proceed
             LOCK(cs);
             txs.insert(txs.end(), batch.begin(), batch.end());
-            return;
+            lastUpdateTime = 0;
+            resetTimer();
+            return;
         }
         TRY_LOCK(wallet->cs_wallet, lock_wallet);
         if (!lock_wallet) {
             LOCK(cs);
             txs.insert(txs.end(), batch.begin(), batch.end());
-            return;
+            lastUpdateTime = 0;
+            resetTimer();
+            return;
         }
+        // Throttle only after successfully acquiring core locks
+        lastUpdateTime = now;
@@
-    std::vector<std::pair<CAmount, std::vector<COutput>>> valueAndUTXOs;
-    pwalletMain->AvailableCoinsForLMint(valueAndUTXOs, &coinControl);
+    std::vector<std::pair<CAmount, std::vector<COutput>>> valueAndUTXOs;
+    wallet->AvailableCoinsForLMint(valueAndUTXOs, &coinControl);

Also applies to: 75-89, 104-109

depends/patches/native_qt/qtbase_skip_tools.patch (1)

16-18: Do not remove qt_internal_create_wrapper_scripts() (build will break).

These wrappers (qt-cmake, qt-configure-module, etc.) are required by downstream Qt modules during configure. Restore the call here and keep other tool skips as-is.

Minimal fix: drop this hunk from the patch so the call remains in QtBaseGlobalTargets.cmake.

doc/build-unix.md (2)

93-96: Wording mismatch: Qt 5 vs Qt 6 packages.

Section header says Qt 5 but the packages are qt6-*. Update the wording to “Qt 6”.

-To build with Qt 5 (recommended) you need the following:
+To build with Qt 6 (recommended) you need the following:

266-268: FreeBSD: nproc not available; use sysctl or getconf.

Replace nproc with sysctl -n hw.ncpu (or getconf) to avoid failures on FreeBSD.

-    cd depends && gmake -j$(nproc) && cd ..
+    cd depends && gmake -j"$(sysctl -n hw.ncpu)" && cd ..
-    cmake --build build -j$(nproc) -- -j$(nproc)
+    cmake --build build -j"$(sysctl -n hw.ncpu)" -- -j"$(sysctl -n hw.ncpu)"

Portable alternative:

-    gmake -j$(nproc)
+    gmake -j"$(getconf _NPROCESSORS_ONLN)"
README.md (2)

111-113: Update Debian/Ubuntu GUI deps to Qt6.

Replace Qt5 packages with Qt6 equivalents to match the migration.

 sudo apt-get install python git curl build-essential cmake pkg-config
 # Also needed for GUI wallet only:
-sudo apt-get install qttools5-dev qttools5-dev-tools libxcb-xkb-dev bison
+sudo apt-get install qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libxcb-xkb-dev bison

174-176: Remove stray make and fix broken code fence.

The extra “make -j$(nproc)” after the prose breaks the fence and duplicates the build step.

-If the build succeeded, binaries will be generated in `build/bin/`: `firod`, `firo-cli`, and if GUI is enabled, `firo-qt`.
-make -j$(nproc)
-```
+If the build succeeded, binaries will be generated in `build/bin/`: `firod`, `firo-cli`, and if GUI is enabled, `firo-qt`.
+```
src/qt/CMakeLists.txt (1)

57-74: Add LinguistTools (and Python3) to ensure lrelease/lupdate/lconvert targets exist.

You use Qt6::lrelease/lupdate/lconvert and Python3::Interpreter; without find_package these imported targets may be missing in this scope.

 get_target_property(qt_lib_type Qt6::Core TYPE)
 
+# Required for Qt6::{lrelease,lupdate,lconvert}
+find_package(Qt6 COMPONENTS LinguistTools REQUIRED)
+# Required for $<TARGET_FILE:Python3::Interpreter>
+find_package(Python3 COMPONENTS Interpreter REQUIRED)

Also applies to: 396-407

depends/packages/qt.mk (2)

101-103: Conflicting zlib options; keep only one.

Both -system-zlib and -qt-zlib are set; choose one (recommend system).

 $(package)_config_opts += -system-zlib
-$(package)_config_opts += -qt-zlib

55-56: C++ standard mismatch (configure c++17 vs QT_FEATURE_cxx20=ON).

Align to C++20 to match the project’s standard and Qt feature checks.

-$(package)_config_opts += -c++std c++17
+$(package)_config_opts += -c++std c++20

Also applies to: 197-199

depends/packages/native_qt.mk (1)

103-110: Undefined variable in fetch breaks download; use _file_name.

$(package)_download_file is not defined; first fetch_file call will fail.

-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \
🧹 Nitpick comments (21)
src/qt/winshutdownmonitor.cpp (1)

7-7: Consider updating the Qt version check to Qt 6.

The version check QT_VERSION >= 0x050000 references Qt 5, but the PR migrates to Qt 6. If Qt 5 support is being dropped, consider updating this to QT_VERSION >= 0x060000 to reflect the new minimum version.

src/qt/winshutdownmonitor.h (1)

12-12: Consider updating the Qt version check to Qt 6.

Similar to the .cpp file, this version check QT_VERSION >= 0x050000 references Qt 5. If Qt 5 support is being dropped with this migration, consider updating to QT_VERSION >= 0x060000 for consistency across both files.

depends/packages/libxcb_util_cursor.mk (1)

29-31: Consider using rm -f for robustness.

The command removes libtool archive files, which is correct for static builds. However, using rm -f would prevent errors if no .la files are present.

Apply this diff for more robust cleanup:

 define $(package)_postprocess_cmds
-  rm lib/*.la
+  rm -f lib/*.la
 endef
depends/patches/qt/qttools_skip_dependencies.patch (1)

3-3: Fix typo in patch description.

"installatiion" should be "installation".

-1. The LLVM installatiion.
+1. The LLVM installation.
src/qt/notificator.cpp (1)

30-55: DBus image marshaling class looks good; prefer explicit QtDBus includes in Qt 6.

Structure, friends, and Q_DECLARE_METATYPE placement are correct. To avoid reliance on umbrella headers in Qt 6, switch to explicit includes.

Apply outside this hunk:

-#include <QtDBus>
+#include <QtDBus/QDBusInterface>
+#include <QtDBus/QDBusArgument>
+#include <QtDBus/QDBusMetaType>
depends/funcs.mk (5)

45-61: Clarify the intent of commented-out local source feature.

This entire function for handling local source directories is commented out. The feature appears substantive (tarball creation, checksums, mtime checks) and is referenced in the commented int_get_build_recipe_hash below (lines 63-73).

If this feature is being removed, delete the commented code. If it's work-in-progress or temporarily disabled for the Qt 6 migration, document the reason and plan.


107-125: Remove obsolete commented code.

The commented int_get_build_properties function and build log paths appear to be superseded by the inline path definitions (lines 93-106) and the logging has been removed (lines 284-287 also commented).

Delete this dead code to reduce clutter.


265-267: Using which for CMAKE tool paths may be fragile.

Lines 265-267 use which to locate ar, nm, and ranlib. If these tools aren't in PATH (which can happen in restricted build environments or with cross-compilation toolchains), this will fail or provide incorrect paths.

Consider using the already-resolved $$($(1)_ar), $$($(1)_nm), and $$($(1)_ranlib) variables directly, as they're set by the toolchain configuration.

-               -DCMAKE_AR=`which $$($(1)_ar)` \
-               -DCMAKE_NM=`which $$($(1)_nm)` \
-               -DCMAKE_RANLIB=`which $$($(1)_ranlib)` \
+               -DCMAKE_AR="$$($(1)_ar)" \
+               -DCMAKE_NM="$$($(1)_nm)" \
+               -DCMAKE_RANLIB="$$($(1)_ranlib)" \

284-287: Remove commented logging infrastructure or document why it's disabled.

The build logging feature is completely commented out. If this is intentional, remove the dead code. If it's temporarily disabled for Qt 6 migration debugging, add a TODO comment explaining when it should be re-enabled.


366-371: Remove commented package include alternatives.

The separate native/regular package includes (lines 366-367) and the int_get_build_properties call (lines 370-371) are superseded by the unified all_packages loop (line 368) and inline property definitions. Delete the commented code.

depends/hosts/darwin.mk (1)

79-82: Darwin/CMake system version doesn’t match OSX_MIN_VERSION.

OSX_MIN_VERSION is 13.0 (Ventura), but darwin_cmake_system_version=20.1 corresponds to macOS 11.x (Big Sur). Align to avoid CMake/toolchain confusion.

Would you update this to match Ventura (Darwin 22.x), e.g.:

-darwin_cmake_system_version=20.1
+darwin_cmake_system_version=22.0

Or derive it from OSX_MIN_VERSION to prevent drift?

src/qt/guiutil.cpp (1)

310-319: Harden suffix extraction regex (handle multi‑ext filters robustly).

Current pattern works but is more complex than needed. Consider a simpler, explicit first‑extension capture and case‑insensitive parse.

-QString ExtractFirstSuffixFromFilter(const QString& filter)
-{
-    QRegularExpression filter_re(QStringLiteral(".* \\(\\*\\.(.*)[ \\)]"), QRegularExpression::InvertedGreedinessOption);
-    QString suffix;
-    QRegularExpressionMatch m = filter_re.match(filter);
-    if (m.hasMatch()) {
-        suffix = m.captured(1);
-    }
-    return suffix;
-}
+QString ExtractFirstSuffixFromFilter(const QString& filter)
+{
+    // Matches: "Text files (*.txt *.md)" -> captures "txt"
+    static const QRegularExpression re(
+        QStringLiteral(R"(.*\(\*\.\s*([^\s)]+))"),
+        QRegularExpression::CaseInsensitiveOption);
+    const auto m = re.match(filter);
+    return m.hasMatch() ? m.captured(1) : QString();
+}

Also applies to: 342-343, 386-389

contrib/rpm/bitcoin.spec (1)

12-13: Spec uses Autotools while project migrates to CMake — verify build still works.

With Qt6 and CMake in the repo, the %build section’s ./autogen.sh/%configure likely breaks. Update to CMake or confirm a compat path exists.

Proposed build section outline:

-%configure LDFLAGS="-L${CWD}/db4/lib/" CPPFLAGS="-I${CWD}/db4/include/" --with-miniupnpc --enable-glibc-back-compat %{buildargs}
-make %{?_smp_mflags}
+cmake -S . -B build \
+  -DCMAKE_BUILD_TYPE=Release \
+  -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+  -DQt6_DIR:PATH=%{_libdir}/cmake/Qt6 \
+  -DWITH_GUI=qt6 \
+  -DWITH_MINIUPNPC=ON \
+  -DBDB_INCLUDE_DIR="${CWD}/db4/include" \
+  -DBDB_LIBRARY="${CWD}/db4/lib/libdb_cxx-4.8.so"
+cmake --build build -j%{?_smp_build_ncpus}
+cmake --install build --prefix=%{buildroot}%{_prefix}

Also applies to: 68-73, 161-171

depends/patches/qt/dont_hardcode_pwd.patch (3)

17-25: Prefer physical path resolution.

Use pwd -P to avoid logical-path surprises via symlinks.

-relpath=`(cd "$relpath"; pwd)`
+relpath=`(cd "$relpath"; pwd -P)`
- outpath=`pwd`
+ outpath=`pwd -P`

31-37: Quote $0 and use pwd -P.

Avoid word-splitting if script path has spaces; ensure physical path.

-script_dir_path=`dirname $0`
-script_dir_path=`(cd "$script_dir_path"; pwd)`
+script_dir_path=`dirname "$0"`
+script_dir_path=`(cd "$script_dir_path"; pwd -P)`

43-49: Same quoting/physical-path fix here.

-script_dir_path=`dirname $0`
-script_dir_path=`(cd "$script_dir_path"; pwd)`
+script_dir_path=`dirname "$0"`
+script_dir_path=`(cd "$script_dir_path"; pwd -P)`
doc/build-unix.md (1)

55-55: Use python3 package name on modern Debian/Ubuntu.

Replace python with python3 to avoid pulling legacy Python 2 meta or nothing.

-    sudo apt-get install git curl python build-essential cmake pkg-config
+    sudo apt-get install git curl python3 build-essential cmake pkg-config
src/qt/CMakeLists.txt (3)

166-188: Duplicate Boost::thread link.

Boost::thread is linked twice (Lines 181 and 279). Drop one.

 target_link_libraries(firo-qt
   PUBLIC
     core_interface
     firoqt
     Qt6::Widgets
     firo_node
     firo_cli
     univalue
     $<TARGET_NAME_IF_EXISTS:firo_wallet>
     $<$<BOOL:${WITH_ZMQ}>:firo_zmq>
-    Boost::thread
     Boost::filesystem
-    Boost::thread
+    Boost::thread
     Boost::program_options

16-44: Plugin include/exclude logic likely conflicts.

You INCLUDE platform/style plugins, then EXCLUDE_BY_TYPE platforms/styles. Confirm that INCLUDE overrides EXCLUDE; otherwise required plugins may be omitted for static builds.

Option A: Remove conflicting types from EXCLUDE_BY_TYPE:

-        platforms
-        styles

Option B: Drop EXCLUDE_BY_TYPE entirely and only INCLUDE the exact plugins needed.


47-50: Update Qt docs URL.

Link still points to qt-5 manual; switch to qt-6.

-#  - https://doc.qt.io/qt-5/cmake-manual.html
+#  - https://doc.qt.io/qt-6/cmake-manual.html
depends/packages/qt.mk (1)

52-60: Duplicate configure flags (-no-egl, -no-zstd).

Remove duplicates to avoid confusion in logs and future edits.

-$(package)_config_opts = -no-egl
+$(package)_config_opts =
 ...
-$(package)_config_opts += -no-egl
 ...
-$(package)_config_opts += -no-zstd

Also applies to: 88-90

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5e7cdbf and 212ce38.

⛔ Files ignored due to path filters (1)
  • .github/workflows/ci-master.yml is excluded by !**/*.yml
📒 Files selected for processing (98)
  • CMakeLists.txt (1 hunks)
  • Dockerfile (2 hunks)
  • Makefile.am (0 hunks)
  • README.md (7 hunks)
  • autogen.sh (0 hunks)
  • build-aux/m4/ax_boost_base.m4 (0 hunks)
  • build-aux/m4/ax_boost_chrono.m4 (0 hunks)
  • build-aux/m4/ax_boost_filesystem.m4 (0 hunks)
  • build-aux/m4/ax_boost_program_options.m4 (0 hunks)
  • build-aux/m4/ax_boost_system.m4 (0 hunks)
  • build-aux/m4/ax_boost_thread.m4 (0 hunks)
  • build-aux/m4/ax_boost_unit_test_framework.m4 (0 hunks)
  • build-aux/m4/ax_check_compile_flag.m4 (0 hunks)
  • build-aux/m4/ax_check_link_flag.m4 (0 hunks)
  • build-aux/m4/ax_check_preproc_flag.m4 (0 hunks)
  • build-aux/m4/ax_cxx_compile_stdcxx.m4 (0 hunks)
  • build-aux/m4/ax_gcc_func_attribute.m4 (0 hunks)
  • build-aux/m4/ax_pthread.m4 (0 hunks)
  • build-aux/m4/ax_subdirs_configure.m4 (0 hunks)
  • build-aux/m4/bitcoin_find_bdb48.m4 (0 hunks)
  • build-aux/m4/bitcoin_qt.m4 (0 hunks)
  • build-aux/m4/bitcoin_subdir_to_include.m4 (0 hunks)
  • build-aux/m4/l_atomic.m4 (0 hunks)
  • cmake/module/FindQt.cmake (0 hunks)
  • configure.ac (0 hunks)
  • contrib/debian/changelog (1 hunks)
  • contrib/debian/rules (1 hunks)
  • contrib/guix/libexec/build.sh (1 hunks)
  • contrib/rpm/README.md (1 hunks)
  • contrib/rpm/bitcoin.spec (3 hunks)
  • depends/Makefile (3 hunks)
  • depends/config.site.in (1 hunks)
  • depends/funcs.mk (7 hunks)
  • depends/hosts/darwin.mk (1 hunks)
  • depends/packages/libxcb_util_cursor.mk (1 hunks)
  • depends/packages/native_qt.mk (1 hunks)
  • depends/packages/packages.mk (1 hunks)
  • depends/packages/qt.mk (2 hunks)
  • depends/packages/qt_details.mk (1 hunks)
  • depends/packages/zeromq.mk (1 hunks)
  • depends/patches/native_qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/native_qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/native_qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/native_qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/native_qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/patches/qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/qt/memory_resource.patch (0 hunks)
  • depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_qmain.patch (1 hunks)
  • depends/patches/qt/qtbase_platformsupport.patch (1 hunks)
  • depends/patches/qt/qtbase_plugins_cocoa.patch (1 hunks)
  • depends/patches/qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/toolchain.cmake.in (3 hunks)
  • doc/build-unix.md (5 hunks)
  • doc/man/Makefile.am (0 hunks)
  • libbitcoinconsensus.pc.in (0 hunks)
  • src/Makefile.am (0 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2.h (1 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2b.c (1 hunks)
  • src/init.cpp (2 hunks)
  • src/leveldb/include/leveldb/env.h (1 hunks)
  • src/leveldb/util/env.cc (1 hunks)
  • src/leveldb/util/env_posix.cc (3 hunks)
  • src/leveldb/util/env_windows.cc (3 hunks)
  • src/qt/CMakeLists.txt (8 hunks)
  • src/qt/automintmodel.cpp (2 hunks)
  • src/qt/bitcoin.cpp (4 hunks)
  • src/qt/bitcoinamountfield.cpp (1 hunks)
  • src/qt/bitcoingui.cpp (8 hunks)
  • src/qt/clientmodel.cpp (3 hunks)
  • src/qt/coincontroldialog.cpp (1 hunks)
  • src/qt/guiutil.cpp (5 hunks)
  • src/qt/notificator.cpp (3 hunks)
  • src/qt/recentrequeststablemodel.cpp (1 hunks)
  • src/qt/recentrequeststablemodel.h (1 hunks)
  • src/qt/rpcconsole.cpp (3 hunks)
  • src/qt/sendcoinsentry.cpp (2 hunks)
  • src/qt/splashscreen.cpp (1 hunks)
  • src/qt/test/CMakeLists.txt (1 hunks)
  • src/qt/transactionfilterproxy.cpp (1 hunks)
  • src/qt/transactiontablemodel.cpp (2 hunks)
  • src/qt/utilitydialog.cpp (2 hunks)
  • src/qt/winshutdownmonitor.cpp (1 hunks)
  • src/qt/winshutdownmonitor.h (1 hunks)
  • src/secp256k1/Makefile.am (0 hunks)
  • src/secp256k1/build-aux/m4/ax_jni_include_dir.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/bitcoin_secp.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/m4_ax_cxx_compile_stdcxx.m4 (0 hunks)
  • src/secp256k1/configure.ac (0 hunks)
  • src/univalue/Makefile.am (0 hunks)
  • src/univalue/autogen.sh (0 hunks)
  • src/univalue/build-aux/m4/.gitignore (0 hunks)
  • src/univalue/configure.ac (0 hunks)
💤 Files with no reviewable changes (36)
  • doc/man/Makefile.am
  • build-aux/m4/ax_check_link_flag.m4
  • src/secp256k1/configure.ac
  • build-aux/m4/ax_boost_thread.m4
  • src/secp256k1/build-aux/m4/m4_ax_cxx_compile_stdcxx.m4
  • build-aux/m4/ax_check_preproc_flag.m4
  • src/univalue/configure.ac
  • build-aux/m4/ax_boost_program_options.m4
  • build-aux/m4/ax_cxx_compile_stdcxx.m4
  • build-aux/m4/ax_gcc_func_attribute.m4
  • autogen.sh
  • src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4
  • build-aux/m4/ax_subdirs_configure.m4
  • src/Makefile.am
  • build-aux/m4/l_atomic.m4
  • build-aux/m4/ax_check_compile_flag.m4
  • configure.ac
  • build-aux/m4/bitcoin_find_bdb48.m4
  • src/univalue/autogen.sh
  • libbitcoinconsensus.pc.in
  • build-aux/m4/bitcoin_subdir_to_include.m4
  • Makefile.am
  • src/univalue/build-aux/m4/.gitignore
  • src/secp256k1/Makefile.am
  • build-aux/m4/ax_boost_system.m4
  • build-aux/m4/ax_pthread.m4
  • src/univalue/Makefile.am
  • depends/patches/qt/memory_resource.patch
  • cmake/module/FindQt.cmake
  • src/secp256k1/build-aux/m4/bitcoin_secp.m4
  • build-aux/m4/ax_boost_chrono.m4
  • build-aux/m4/ax_boost_base.m4
  • build-aux/m4/ax_boost_unit_test_framework.m4
  • build-aux/m4/bitcoin_qt.m4
  • build-aux/m4/ax_boost_filesystem.m4
  • src/secp256k1/build-aux/m4/ax_jni_include_dir.m4
🚧 Files skipped from review as they are similar to previous changes (23)
  • src/qt/coincontroldialog.cpp
  • depends/packages/zeromq.mk
  • src/qt/transactionfilterproxy.cpp
  • src/qt/rpcconsole.cpp
  • src/qt/transactiontablemodel.cpp
  • depends/patches/native_qt/dont_hardcode_pwd.patch
  • contrib/guix/libexec/build.sh
  • depends/packages/qt_details.mk
  • src/leveldb/util/env.cc
  • src/qt/bitcoin.cpp
  • src/qt/recentrequeststablemodel.h
  • src/qt/bitcoinamountfield.cpp
  • Dockerfile
  • src/init.cpp
  • src/crypto/MerkleTreeProof/blake2/blake2.h
  • depends/packages/packages.mk
  • depends/patches/native_qt/qtbase_avoid_native_float16.patch
  • src/qt/splashscreen.cpp
  • CMakeLists.txt
  • src/crypto/MerkleTreeProof/blake2/blake2b.c
  • src/leveldb/util/env_posix.cc
  • src/qt/test/CMakeLists.txt
  • depends/Makefile
🧰 Additional context used
🧬 Code graph analysis (4)
src/qt/winshutdownmonitor.h (1)
src/qt/winshutdownmonitor.cpp (2)
  • nativeEventFilter (19-54)
  • nativeEventFilter (19-19)
src/leveldb/include/leveldb/env.h (2)
src/init.cpp (2)
  • Shutdown (235-347)
  • Shutdown (235-235)
src/leveldb/util/env.cc (2)
  • Shutdown (90-90)
  • Shutdown (90-90)
src/qt/clientmodel.cpp (1)
src/chainparams.cpp (4)
  • Params (1348-1351)
  • Params (1348-1348)
  • Params (1353-1365)
  • Params (1353-1353)
src/leveldb/util/env_windows.cc (1)
src/leveldb/util/env_posix.cc (1)
  • shutdown_requested_ (732-735)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: build-guix-arm64-apple-darwin
  • GitHub Check: build-guix-aarch64-linux-gnu
  • GitHub Check: build-guix-x86_64-w64-mingw32
  • GitHub Check: build-windows-cmake
  • GitHub Check: build-linux-cmake
  • GitHub Check: build
🔇 Additional comments (55)
src/qt/winshutdownmonitor.cpp (1)

19-19: LGTM! Correct Qt 6 signature update.

The parameter type change from long* to qintptr* correctly aligns with Qt 6's QAbstractNativeEventFilter::nativeEventFilter signature, ensuring portable behavior across 32-bit and 64-bit Windows platforms.

src/qt/winshutdownmonitor.h (1)

21-21: LGTM! Declaration correctly updated for Qt 6.

The method signature update from long* to qintptr* is consistent with the implementation and correctly matches Qt 6's QAbstractNativeEventFilter::nativeEventFilter base class signature.

depends/patches/native_qt/qttools_skip_dependencies.patch (2)

13-14: Verification confirms patch is safe—clang-dependent features are already disabled.

The project explicitly disables qdoc and assistant at the Qt build level (native_qt.mk, qt.mk). Documentation generation uses Doxygen (independent of LLVM/Clang), not qdoc. Commenting out qt_find_package(WrapLibClang) has no impact on project functionality.


24-33: No action required — patch correctly removes unused tools.

Verification confirms the removed tools are not used in the build process:

  • lprodump: No references in the codebase (diagnostic tool only).
  • lrelease-pro/lupdate-pro: No references found (qmake-specific; obsolete with CMake migration).
  • linguist GUI: Optional tool mentioned in documentation for manual translator editing, but not part of the automated build workflow.

The essential translation tools are retained and actively used:

  • lrelease: Compiles .ts to .qm files (src/qt/CMakeLists.txt:66)
  • lupdate: Updates .ts files from source code (src/qt/CMakeLists.txt:405; required per src/Makefile.qt.include:529)
  • lconvert: Converts translation formats (src/qt/CMakeLists.txt:406)
  • LinguistTools CMake module: Retained for build integration
depends/packages/libxcb_util_cursor.mk (6)

8-11: LGTM!

The configuration options are appropriate for a static library build in the depends system. Disabling shared libraries and dependency tracking is standard practice.


13-15: LGTM!

Copying config.guess and config.sub is a standard practice to ensure the package can detect and build on current platforms.


17-19: LGTM!

Standard configuration command using the autoconf macro.


21-23: LGTM!

Standard make build command.


25-27: LGTM!

Standard staging command with DESTDIR for isolated installation.


1-6: ****

The SHA256 hash 0e9c5446dc6f3beb8af6ebfcc9e27bcc6da6fe2860f7fc07b99144dfa568e93b matches the official xcb-util-cursor-0.1.5 release. Version 0.1.5 is the current version in Debian, and Qt6 from 6.5.0+ requires libxcb-cursor, making version 0.1.5 appropriate for Qt6 compatibility. The package metadata is correct and requires no changes.

depends/patches/qt/qttools_skip_dependencies.patch (2)

24-33: Verify removed linguist tools aren't required elsewhere.

Two comprehensive searches across the codebase found no references to the removed tools (lprodump, lrelease-pro, lupdate-pro). This suggests the removal is isolated; however, please manually confirm that:

  1. These tools aren't conditionally referenced in runtime configurations or documentation
  2. The linguist GUI removal doesn't impact any dependent features
  3. The patch applies cleanly to your target Qt6 version

13-17: No changes needed—patch design is correct.

The changes are intentional and well-coordinated: commenting out qt_find_package(WrapLibClang...) is safe because the subdirectories that would require WrapLibClang (lprodump, lrelease-pro, lupdate-pro, linguist) are also removed from the build. The if(TARGET WrapLibClang::WrapLibClang) block will be skipped as intended, preventing any attempt to use an undefined target. The patch coherently skips both the LLVM dependency and the code that depends on it, eliminating any downstream build failures.

src/leveldb/util/env_windows.cc (3)

680-683: LGTM: Correct shutdown signaling implementation.

The shutdown implementation correctly sets the atomic flag before signaling the condition variable, ensuring the background thread will observe the shutdown request when it wakes. The async design (returning immediately without waiting for thread exit) aligns with the usage in src/init.cpp.


709-709: LGTM: Proper atomic flag for shutdown signaling.

The atomic boolean with inline initialization is the correct approach for thread-safe shutdown signaling across the Shutdown() method and BackgroundThreadMain().


777-780: LGTM: Background thread checks shutdown flag correctly.

The shutdown check appropriately exits the background thread after unlocking the mutex. The check occurs only when the work queue is empty, which allows pending work items to complete before shutdown—this is the intended behavior for graceful shutdown.

src/leveldb/include/leveldb/env.h (1)

191-192: LGTM: Clean API addition for shutdown support.

The virtual Shutdown() method is well-documented and appropriately placed in the Env interface.

depends/patches/native_qt/rcc_hardcode_timestamp.patch (1)

9-21: ****

The original concern conflates two different reproducibility strategies. SOURCE_DATE_EPOCH is indeed standard for reproducible builds with Qt RCC (supported since Qt 5.13), but that applies to applications using Qt, not to the Qt package build itself.

This patch intentionally removes SOURCE_DATE_EPOCH support to make the Qt pre-built binary deterministic and cache-able regardless of the build environment's SOURCE_DATE_EPOCH setting. This is a deliberate trade-off: the Qt package becomes environment-independent, while applications built on top of it (like Bitcoin Core's GUI) handle reproducibility at their own layer.

The hardcoded value of 1 is appropriate for this approach. No action required.

depends/patches/qt/qtbase_skip_tools.patch (2)

46-47: The removed tools are not required by the codebase.

Verification confirms:

  • No .trace files requiring tracegen/tracepointgen
  • No .g parser files requiring qlalr
  • No Vulkan usage requiring qvkgen
  • No tool invocations in build configuration

The patch explicitly documents these as "unneeded tools" removed for build optimization in the Qt6 update.


30-37: This review comment is incorrect and can be disregarded.

This patch modifies Qt's internal build configuration, not the project's CI infrastructure. The tools being removed—coin/instructions/qmake/ensure_pro_file.cmake, qt-testrunner.py, and sanitizer-testrunner.py—are Qt's own internal utilities used during Qt's build, not dependencies of the cryptocurrency project.

The codebase contains zero references to these files, confirming the project does not rely on them. The patch is an intentional optimization to skip unnecessary Qt build artifacts when cross-compiling Qt as an external dependency. The project's own CI infrastructure (Jenkinsfile, .github workflows) operates independently and is unaffected by this change.

Likely an incorrect or invalid review comment.

depends/toolchain.cmake.in (8)

16-19: LGTM! Proper cross-compilation compiler target configuration.

Setting the compiler targets for cross-compilation is correct and follows CMake best practices.


103-108: LGTM! Correct CMAKE_FIND_ROOT_PATH usage for cross-compilation.

The change from CMAKE_PREFIX_PATH to CMAKE_FIND_ROOT_PATH is appropriate for cross-compilation toolchains, and the Qt translations directory path is correctly configured.


110-113: LGTM! Guard prevents duplicate CMAKE_PREFIX_PATH entries.

The check prevents duplicate entries when the toolchain file is included multiple times, which is appropriate given the comment about repeated calls.


141-146: LGTM! Correct pattern matching for Qt packages and Qt6_ROOT configuration.

The use of MATCHES "^[ ]*$" properly handles whitespace-only or empty strings, and setting Qt6_ROOT correctly aligns with the Qt6 upgrade.


148-152: LGTM! Correct pattern matching for qrencode packages.


154-164: LGTM! Correct pattern matching for ZMQ and wallet packages.


174-178: LGTM! Correct pattern matching for USDT packages.


123-134: The review comment is incorrect. The code implementation is correct.

PKG_CONFIG_ARGN is a CMake CACHE variable provided by the FindPkgConfig module that holds additional arguments to pass to pkg-config, designed to be set as a CMake variable. Setting it at line 133 as set(PKG_CONFIG_ARGN --static) is the correct and documented approach. FindPkgConfig will append the contents of PKG_CONFIG_ARGN to every pkg-config invocation it performs, ensuring the --static flag is automatically passed to all downstream pkg_check_modules() calls throughout the codebase.

Likely an incorrect or invalid review comment.

depends/patches/qt/qtbase_plugins_cocoa.patch (2)

1-7: I'll verify the CMake issue and the upstream Qt code review link to assess whether this workaround is still relevant.

Now let me verify the Qt code review link:

The patch is correct and the CMake issue reference is valid—add direct link for clarity.

CMake issue 23464 documents a real bug where enabling precompiled headers on a target with all sources skipping them causes AUTOMOC to fail, as it depends on the .pch file implicitly. The workaround in this patch—disabling precompiled headers for QCocoaIntegrationPlugin when -no-feature-sessionmanager is used—is appropriate.

Your project's minimum CMake version is 3.22, which is below 3.25 (when the fix was addressed), so this workaround remains relevant. The direct link to CMake issue 23464 is https://gitlab.kitware.com/cmake/cmake/-/issues/23464. Consider updating the patch header to include this URL alongside the Qt code review reference for better documentation.


16-21: Workaround implementation is technically sound; necessity unclear for this build environment.

The underlying issue (CMake issue 23464) relates to AUTOMOC failing when precompiled headers are enabled on a target but all sources skip them, as AUTOMOC relies on the .pch file implicitly. The patch correctly implements a narrow workaround targeting only CMake versions before 3.25 on Apple platforms, which aligns with Qt 6.7.3's minimum CMake requirement of 3.21.1 for macOS.

The fix appears unnecessary if your build uses CMake 3.25+, but the condition is properly scoped and only affects QCocoaIntegrationPlugin when sessionmanager support is disabled. Consider removing this patch if you require CMake 3.25 or later in your build environment.

depends/config.site.in (1)

65-67: Change verified: qt5_debug → qt6_debug is correct and complete.

The modification aligns with the Qt 6 migration. Verification confirms:

  • No remaining qt5_debug references in active code
  • Remaining qt5 mentions are only in documentation, comments, and URLs
  • with_gui variable is in the legacy config.site.in template (used only by deprecated gitian cross-compilation)
  • The active CMake build does not use config.site.in, so this change does not affect the primary build path
  • Change is consistent and poses no risk
depends/patches/qt/rcc_hardcode_timestamp.patch (1)

9-21: AI summary is inconsistent with the actual changes.

The AI summary states that "lastModified is now obtained with QTimeZone::UTC via m_fileInfo.lastModified(QTimeZone::UTC)," but the patch actually removes that line (line 13) and replaces all timestamp logic with a hardcoded value of 1 (line 21). The patch eliminates dynamic timestamp retrieval entirely for reproducible builds.

src/qt/notificator.cpp (2)

82-85: Good: register DBus type before use.

Eager registration via FreedesktopImage::metaType() is correct and avoids marshalling failures.


154-158: LGTM: use QVariant::fromValue for custom type.

Correct approach with Q_DECLARE_METATYPE(FreedesktopImage) in place.

depends/patches/qt/qtbase_avoid_native_float16.patch (2)

12-37: Patch verified as correct and properly applied to Qt 6.7.3.

Qt 6.7 platform support includes macOS 14, iOS 17, Windows 11 23H2 and Android 14, and the script output confirms this codebase targets Qt 6.7.3 specifically. The patch applies cleanly to both native_qt.mk and qt.mk build configurations.

The patch correctly disables native float16 support by removing conditional compilation branches and forcing QFLOAT16_IS_NATIVE = 0. Conversion is performed by hardware when possible, but on processors that do not natively support half-precision, the conversion is performed through a sequence of lookup table operations. This fallback mechanism ensures the code functions correctly on all platforms while maintaining compatibility.


1-10: Verify whether this patch is still necessary.

The patch header states this workaround can be dropped once the minimum required libgcc is 12.x or newer. GCC 12 was released in May 2022, and many Linux distributions now ship with GCC 12+ by default.

Please verify:

  1. What is the minimum GCC/libgcc version targeted by this project?
  2. If GCC 12+ is already the minimum, this patch may be unnecessary.
  3. If older GCC versions are still supported, consider documenting the performance implications of disabling native float16 support on platforms that have hardware support (ARM with IEEE float16, x86 with SSE2, C++23 with std::float16_t).

Run the following script to check the project's documented GCC requirements:

depends/hosts/darwin.mk (1)

69-69: Remove -fuse-ld=lld from CXXFLAGS; verify other flags.

The review correctly identifies that -fuse-ld=lld should not be in CXXFLAGS (it's already correctly placed in LDFLAGS on line 70). However, the rationale for removing -nostdinc++ and -isystem$(OSX_SDK)/usr/include/c++/v1 needs clarification.

What is verified:

  • darwin_CXX does exist (lines 58-61) and includes -nostdlibinc and -iwithsysroot/usr/include/c++/v1
  • Line 69 adds both -nostdinc++ and -isystem$(OSX_SDK)/usr/include/c++/v1

What requires developer verification:

  1. The claim that -nostdinc++ is "redundant with -nostdlibinc" is oversimplified. These are distinct flags (one disables C stdlib includes, the other disables C++ stdlib includes). In cross-compilation contexts, both may serve different purposes. Only remove if confirmed unnecessary through testing.

  2. The duplicate include path claim (-isystem$(OSX_SDK)/usr/include/c++/v1 vs darwin_CXX's -iwithsysroot/usr/include/c++/v1) appears valid if $(OSX_SDK) resolves to the sysroot path, but needs confirmation that they point to identical locations and that -iwithsysroot alone is sufficient.

Apply at minimum:

-darwin_CXXFLAGS += -mlinker-version=$(LLD_VERSION) -nostdinc++ -isystem$(OSX_SDK)/usr/include/c++/v1 -fuse-ld=lld
+darwin_CXXFLAGS += -mlinker-version=$(LLD_VERSION) -nostdinc++ -isystem$(OSX_SDK)/usr/include/c++/v1
contrib/debian/changelog (1)

48-48: LGTM!

The changelog entry correctly reflects the Qt6 migration for the 0.13.1-trusty1 release.

src/qt/recentrequeststablemodel.cpp (1)

245-245: LGTM!

The update from toTime_t() to toSecsSinceEpoch() correctly modernizes the API usage for Qt6, where toTime_t() has been deprecated. The comparison logic remains functionally equivalent.

depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (1)

10-14: LGTM!

The patch correctly adds _GLIBCXX_VISIBILITY to moc's ignored macro list, following the established pattern for __attribute__ and __declspec. This addresses QTBUG-83160 and prevents moc from incorrectly processing this GCC internal macro.

src/qt/sendcoinsentry.cpp (2)

19-21: LGTM!

The addition of the QRegularExpression include is necessary for Qt6 compatibility.


88-88: LGTM!

The migration from QRegExp to QRegularExpression is required for Qt6, as QRegExp has been deprecated. The pattern and functionality remain identical—removing control characters from the memo text.

src/qt/utilitydialog.cpp (2)

27-27: LGTM!

The addition of the QRegularExpression include is necessary for Qt6 compatibility.


57-59: LGTM!

The migration from QRegExp to QRegularExpression is required for Qt6. The pattern correctly uses non-greedy matching (.*?) to extract URLs from angle brackets, maintaining the same functionality for making license URLs clickable.

depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch (1)

10-14: LGTM!

The patch correctly adds _GLIBCXX_VISIBILITY to moc's ignored macro list for native Qt builds, following the established pattern for __attribute__ and __declspec. This mirrors the same fix applied in depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch and addresses QTBUG-83160.

contrib/debian/rules (1)

15-15: I need to gather more information to verify this concern. Let me search the codebase for context:

I need to search the repository to understand the context better. Let me check the related Debian files and git history:

Based on my research, I need to understand the actual repository context. Let me check the codebase directly:

I found that this is PulseView (sigrok). The current official packages use Qt5, but the new code tries to use Qt4 on Ubuntu. This needs verification against the actual repository. Let me search for more context directly.

Verify the Qt version logic against the repository context and build system, especially confirming whether Qt4 on Ubuntu is intentional given the PR's stated migration from Qt5 to Qt6.

The web search confirms that Qt4 has been removed from Ubuntu 20.04 main repository, yet the current code QT=$(shell dpkg-vendor --derives-from Ubuntu && echo qt4 || echo qt6) assigns Qt4 to Ubuntu systems. Meanwhile, current Debian packages depend on Qt5 development files (libqt5svg5-dev, qtbase5-dev), indicating the project historically used Qt5.

The concern remains valid: if this PR migrates from Qt5 to Qt6 globally, Ubuntu should also migrate to Qt6 (or at minimum Qt5), not regress to the obsolete Qt4 that's no longer available in modern Ubuntu releases.

src/qt/clientmodel.cpp (1)

167-172: Good move to fromSecsSinceEpoch (Qt6‑safe, 64‑bit).

These replacements correctly avoid Y2038 issues and align with Qt6 APIs. No further action.

Also applies to: 287-290, 373-376, 554-556

src/qt/bitcoingui.cpp (2)

387-391: Shortcut bitwise OR usage is correct for Qt6.

Using Qt::CTRL | Qt::Key_Q and for QShortcut with CTRL|SHIFT|Key_* is appropriate. No issues.

Also applies to: 462-464


554-556: Time API change to fromSecsSinceEpoch — good.

Consistent with other Qt6 migrations; keeps 64‑bit epoch.

src/qt/automintmodel.cpp (1)

122-151: Good: importTransactions() retries via QTimer::singleShot on lock contention.

This avoids stalling startup ingestion. Keep as is.

depends/patches/native_qt/qtbase_skip_tools.patch (2)

30-38: OK to skip CI support file installs.

Safe to exclude libexec CI helpers; they are not needed for building/using Qt in depends.


46-48: Verify tool removals don’t trip optional features.

Removing tracepointgen/tracegen and qlalr/qvkgen is fine only if the corresponding features are disabled (e.g., lttng/libinput tracing, QML/graph parsers, Vulkan). Please confirm configure flags/features ensure these tools aren’t required on your target configs (Linux/Windows, static/dynamic).

If needed, prefer feature switches over hard-removing subdirs.

Also applies to: 57-59

depends/patches/qt/qtbase_avoid_qmain.patch (1)

17-19: Dropping QT_NEEDS_QMAIN: confirm Windows linking paths.

Ensure firo-qt links and starts correctly with both MinGW-w64 and MSVC, static and shared Qt. Specifically verify main symbol resolution (no qMain rename) and that EntryPoint still provides WinMain when needed.

depends/patches/qt/qtbase_platformsupport.patch (1)

26-32: Good guard to avoid empty InputSupportPrivate.

Condition looks correct (xkbcommon alone no longer triggers input). Please confirm builds with CMake < 3.25 and >= 3.25 across your targets to avoid regression tied to upstream issue 23464.

README.md (1)

155-164: Manual verification required: depends build must be executed to confirm post-build artifact location.

The review comment requests verification that the documented toolchain path exists after building depends. Investigation shows:

  • depends/config.guess exists and is executable ✓
  • Makefile confirms toolchain.cmake is generated at $(host_prefix)/toolchain.cmake (line 206), which matches the documented depends/$(depends/config.guess)/toolchain.cmake pattern ✓
  • Documentation path syntax appears correct

However, the sandbox environment lacks make and cannot execute the full build process. The presence of the post-build artifact depends/<host>/toolchain.cmake cannot be definitively confirmed without running make -j$(nproc) in the depends directory to generate the toolchain file from toolchain.cmake.in.

depends/packages/qt.mk (1)

236-243: XCB feature is already properly enabled and integrated for static Qt builds on Linux.

The code shows:

  • Line 237 (qt.mk): -DQT_FEATURE_xcb=ON explicitly enables XCB on Linux ✓
  • Line 103 (qt.mk): -static flag confirms static build ✓
  • Lines 17-20 (src/qt/CMakeLists.txt): Static builds on Linux/FreeBSD import Qt6::QXcbIntegrationPlugin
  • Lines 172-173 (src/qt/CMakeLists.txt): Qt6::Widgets and Qt6::Network are linked in the GUI ✓

No action needed—the XCB backend is properly configured and will be available for the linked Qt6::Network and Qt6::Widgets modules in the static build.


$(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify PKG_CONFIG_SYSROOT_DIR is correct for cross-compilation.

Setting PKG_CONFIG_SYSROOT_DIR=/ appears problematic for cross-compilation scenarios. Typically, this should point to the sysroot of the target system, not the host root. This could cause pkg-config to find host libraries instead of target libraries when cross-compiling Qt 6.

Verify that this setting is correct for all build scenarios (native and cross-compilation).


🏁 Script executed:

#!/bin/bash
# Verify how PKG_CONFIG_SYSROOT_DIR is used in cross-compilation scenarios
# and whether "/" is appropriate for all cases

# Check if there are target-specific sysroot settings elsewhere
rg -n "PKG_CONFIG_SYSROOT_DIR" -A 2 -B 2

# Check for cross-compilation configurations
rg -n "host_os|host_arch|cross" depends/hosts/

Length of output: 1544


Now let me search for more context about how this template is used and what $(1)_type evaluates to:

Now let me search the codebase to understand what $(1)_type evaluates to and if there's special handling:<!-- [scratchpad_start]
[task final_verification]
Critical findings from web search and previous shell script results
[observations]

  • Search result 21-1 and 21-2 show Bitcoin Core's funcs.mk uses $($($(1)_type)_prefix) pattern for environment variables
  • Line 217-218 in original script output: PKG_CONFIG_LIBDIR and PKG_CONFIG_PATH both use $($($(1)_type)_prefix)
  • Line 219 in original script output: PKG_CONFIG_SYSROOT_DIR=/ - hardcoded to "/" instead of using $(1)_type pattern
  • PR #17118 (source 25) shows Bitcoin's depends system DOES have sysroot handling for macOS
  • The inconsistency is now clear: all other PKG_CONFIG vars are dynamic, SYSROOT_DIR is static
  • Web search results 2-19 show proper cross-compilation should use: export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}
    [analysis]
    CONFIRMED ISSUE: Setting PKG_CONFIG_SYSROOT_DIR=/ is inconsistent and likely incorrect for cross-compilation:
  1. Violates the pattern established in lines 217-220 where all other pkg-config vars use $($($(1)_type)_prefix)
  2. For cross-compilation, "/" points to host system, not target sysroot
  3. Should follow the pattern: PKG_CONFIG_SYSROOT_DIR=$($($(1)_type)_prefix)
  4. This affects Qt 6 and all packages built through depends system
    [done]
    Issue is confirmed. The review comment is correct - line 219 should use a dynamic target-specific path, not a hardcoded "/"
    [scratchpad_start] -->

Based on my verification, the review comment is correct. The recommended practice for cross-compilation is to set PKG_CONFIG_SYSROOT_DIR to the actual sysroot path, not to "/" (the host root).

Looking at the code:

  • Line 217: PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig (dynamic, target-specific)
  • Line 218: PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig (dynamic, target-specific)
  • Line 219: PKG_CONFIG_SYSROOT_DIR=/ (hardcoded to root)
  • Line 220: CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake (dynamic, target-specific)

The inconsistency is problematic. Setting PKG_CONFIG_SYSROOT_DIR=/ will cause pkg-config to look in the host system's "/" during cross-compilation instead of the target's sysroot, potentially finding host libraries instead of target libraries.


Investigate and correct PKG_CONFIG_SYSROOT_DIR setting for cross-compilation compatibility.

The sysroot path needs to be prefixed to paths searched for headers and libraries during cross-compilation. Line 219 sets PKG_CONFIG_SYSROOT_DIR=/, which breaks this contract by pointing to the host root instead of the target sysroot. This is inconsistent with the dynamic target-specific references used in lines 217, 218, and 220 (all using $($($(1)_type)_prefix)). For proper cross-compilation support, PKG_CONFIG_SYSROOT_DIR should use the same pattern.

🤖 Prompt for AI Agents
In depends/funcs.mk around line 219, PKG_CONFIG_SYSROOT_DIR is hardcoded to "/"
which breaks cross-compilation and is inconsistent with neighbouring
PKG_CONFIG_* lines; change the assignment to use the target-specific prefix like
the others (i.e. set PKG_CONFIG_SYSROOT_DIR to $($($(1)_type)_prefix) so the
sysroot points at the target prefix used for
PKG_CONFIG_LIBDIR/PATH/CMAKE_MODULE_PATH).

darwin_CXXFLAGS += -mlinker-version=$(LLD_VERSION)
darwin_LDFLAGS += -Wl,-no_adhoc_codesign -fuse-ld=lld
darwin_CXXFLAGS += -mlinker-version=$(LLD_VERSION) -nostdinc++ -isystem$(OSX_SDK)/usr/include/c++/v1 -fuse-ld=lld
darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) -Wl,-no_adhoc_codesign -fuse-ld=lld
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Avoid duplicate -platform_version in darwin_LDFLAGS.

Line 65 already sets -Wl,-platform_version,...; line 70 re-appends it, which can emit linker warnings and is redundant. Keep it only once.

Apply this diff:

-darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) -Wl,-no_adhoc_codesign -fuse-ld=lld
+darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-no_adhoc_codesign -fuse-ld=lld

Run to confirm there’s a single occurrence:


🏁 Script executed:

#!/bin/bash
rg -n -C1 --fixed-strings '-platform_version,macos,' depends/hosts/darwin.mk

Length of output: 43


🏁 Script executed:

#!/bin/bash
# Try grep with simpler pattern to avoid rg parsing issues
grep -n "platform_version" depends/hosts/darwin.mk

Length of output: 260


🏁 Script executed:

#!/bin/bash
# Get full context around lines 65 and 70 to see conditionals and scoping
sed -n '58,75p' depends/hosts/darwin.mk | cat -n

Length of output: 1024


Remove duplicate -platform_version from darwin_LDFLAGS append.

Line 65 sets darwin_LDFLAGS=-Wl,-platform_version,.... When cross-compiling (build_os ≠ darwin), line 70 appends the same flag again via +=, causing duplication. Remove it from line 70 to keep a single occurrence.

Apply this diff:

-darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) -Wl,-no_adhoc_codesign -fuse-ld=lld
+darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-no_adhoc_codesign -fuse-ld=lld
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) -Wl,-no_adhoc_codesign -fuse-ld=lld
darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-no_adhoc_codesign -fuse-ld=lld
🤖 Prompt for AI Agents
In depends/hosts/darwin.mk around line 70, the darwin_LDFLAGS append is
duplicating the -Wl,-platform_version,... flag already set on line 65; remove
the -Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) portion
from the line 70 append so it only adds -Wl,-syslibroot,$(OSX_SDK)
-Wl,-no_adhoc_codesign -fuse-ld=lld (keeping the single -platform_version
occurrence defined on line 65).

@@ -0,0 +1,36 @@
QtTools: Skip unnecessary dependencies:

1. The LLVM installatiion.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix typo in patch description.

"installatiion" should be "installation".

Apply this diff:

-1. The LLVM installatiion.
+1. The LLVM installation.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
1. The LLVM installatiion.
1. The LLVM installation.
🤖 Prompt for AI Agents
In depends/patches/native_qt/qttools_skip_dependencies.patch around line 3,
there is a typo in the patch description: "installatiion" should be corrected to
"installation"; edit that line in the patch file to replace the misspelled word
with the correct spelling and save the patch.

Comment on lines +1 to +5
Hardcode last modified timestamp in Qt RCC

This change allows the already built qt package to be reused even with
the SOURCE_DATE_EPOCH variable set, e.g., for Guix builds.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Good: Clear reproducible build approach for Qt package reuse.

The patch description clearly states the purpose: enabling deterministic builds so the Qt package can be reused across different build environments (e.g., Guix). This is a standard pattern for reproducible builds.

Please verify that:

  1. This patch is compatible with Qt 6.7.3 (the version being upgraded to)
  2. Resource loading functionality works correctly with the hardcoded timestamp
  3. Builds are actually reproducible with this change

Run the following to check Qt 6 compatibility and any related documentation:


🌐 Web query:

Qt 6.7 RCC timestamp handling reproducible builds

💡 Result:

Short answer — rcc embeds file modification times into its output, so to make Qt 6.7 rcc runs reproducible you must provide a stable timestamp or use rcc options that avoid embedding real mtimes. Recommended options:

  • Set SOURCE_DATE_EPOCH (or QT_RCC_SOURCE_DATE_OVERRIDE) to a fixed epoch before running builds. Example:
    export SOURCE_DATE_EPOCH=1672531200
    (Qt respects SOURCE_DATE_EPOCH / QT_RCC_SOURCE_DATE_OVERRIDE to force deterministic timestamps.) [1][2]

  • Or use rcc format version 1 which does not embed timestamps: pass --format-version 1 to rcc. If you use CMake AUTORCC, set:
    CMAKE_AUTORCC_OPTIONS="--format-version;1"
    (only suitable if you have Qt >= the version that supports it; see notes below). [2][6]

  • As a fallback, normalize the mtimes of all files referenced by the .qrc before running rcc (touch -t or SOURCE_DATE_EPOCH-based touch). This is what many downstream reproducible-build systems do. [4][5]

Sources:

  • Qt rcc documentation (rcc options and behavior). [1]
  • Reproducible-builds guidance noting rcc embeds modification times and listing the mitigations (SOURCE_DATE_EPOCH, QT_RCC_SOURCE_DATE_OVERRIDE, --format-version 1, or touching inputs). [2]
  • Practical reports / discussion and examples (Stack Overflow / blog posts) describing timestamp causes and workarounds. [4][5]

If you want, tell me which build system (CMake/ninja/Yocto) you use and I’ll give the exact commands to make a 6.7 build reproducible.


Critical: Patch approach contradicts Qt 6.7 reproducible build best practices.

The patch removes support for SOURCE_DATE_EPOCH and QT_RCC_SOURCE_DATE_OVERRIDE, which are the recommended Qt-supported mechanisms for reproducible builds. Instead of using environment variables, the patch hardcodes the timestamp in source code—an inflexible approach that:

  • Contradicts Qt's built-in mechanism that respects SOURCE_DATE_EPOCH/QT_RCC_SOURCE_DATE_OVERRIDE for deterministic timestamps
  • Applies to formatVersion >= 2, which embeds modification times into output, making the hardcoded value less maintainable
  • Removes flexibility needed for different build scenarios (e.g., varying epoch values for different distributions)

Recommended fix: Instead of patching the timestamp into the code, use the Qt-supported approach: set SOURCE_DATE_EPOCH to a fixed value before building (e.g., export SOURCE_DATE_EPOCH=1672531200), or use format version 1 with --format-version 1 which does not embed timestamps.

🤖 Prompt for AI Agents
In depends/patches/native_qt/rcc_hardcode_timestamp.patch around lines 1-5, the
patch hardcodes a fixed last-modified timestamp into the Qt RCC source which
removes support for SOURCE_DATE_EPOCH and QT_RCC_SOURCE_DATE_OVERRIDE and breaks
reproducible-build best practices; revert the hardcoded timestamp change and
restore the original logic that checks for QT_RCC_SOURCE_DATE_OVERRIDE and/or
SOURCE_DATE_EPOCH and uses those values when present, or alternatively ensure
builds use format version 1 where timestamps are not embedded (or set
SOURCE_DATE_EPOCH in the build environment) so reproducible timestamps are
provided via the supported environment variables rather than by hardcoding a
value.

Comment on lines +1 to +8
Skip building/installing unneeded tools:

1. Wrapper CMake scripts.
2. CI support files.
3. tracepointgen and tracegen tools.
4. Qt Look Ahead LR Parser Generator (qlalr).
5. Qt Vulkan Header Generator (qvkgen).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify that all removed tools are truly unneeded.

The patch claims these tools are "unneeded," but some may be required by downstream modules or the build process itself. Please confirm:

  • Wrapper scripts: Required by downstream Qt modules (see critical issue below)
  • tracepointgen/tracegen: Used for trace/instrumentation generation
  • qlalr: Parser generator that may be needed for certain Qt modules
  • qvkgen: Vulkan header generator that may be needed if Vulkan support is enabled

Run this script to check if these tools are referenced in the codebase:


🏁 Script executed:

#!/bin/bash
# Search for references to the removed tools

echo "=== Checking for wrapper script usage ==="
rg -n "qt-cmake|qt-configure-module" --type=cmake -C3

echo "=== Checking for tracegen/tracepointgen usage ==="
rg -n "tracegen|tracepointgen" --type=cmake -C3

echo "=== Checking for qlalr usage ==="
rg -n "qlalr|QLALR" --type=cmake -C3

echo "=== Checking for qvkgen usage ==="
rg -n "qvkgen|QVKGEN" --type=cmake -C3

Length of output: 158


🏁 Script executed:

#!/bin/bash
# Broader search for tool references across all file types

echo "=== Repository context ==="
head -20 README.md 2>/dev/null || echo "No README.md found"
ls -la depends/ 2>/dev/null | head -20

echo "=== Searching all files for wrapper scripts ==="
rg -n "qt-cmake|qt-configure-module" -C2 | head -30

echo "=== Searching all files for tracegen/tracepointgen ==="
rg -n "tracegen|tracepointgen" -C2 | head -30

echo "=== Searching all files for qlalr ==="
rg -n "qlalr" -C2 | head -30

echo "=== Searching all files for qvkgen ==="
rg -n "qvkgen" -C2 | head -30

echo "=== Check if other Qt patches reference these tools ==="
find depends/patches/qt -name "*.patch" -type f | xargs grep -l "qt-cmake\|qt-configure-module\|tracegen\|qlalr\|qvkgen" 2>/dev/null || echo "No other patches reference these tools"

echo "=== Check build system scripts ==="
find . -name "*.sh" -o -name "*.py" | xargs grep -l "qt-cmake\|tracegen\|qlalr\|qvkgen" 2>/dev/null | head -10 || echo "No references in build scripts"

Length of output: 7388


🏁 Script executed:

#!/bin/bash
# Examine the actual qtbase_skip_tools.patch to see what's being skipped

echo "=== Content of qtbase_skip_tools.patch (first part) ==="
head -60 git/depends/patches/qt/qtbase_skip_tools.patch | tail -40

echo ""
echo "=== Check if wrapper script generation is being skipped ==="
grep -n "qt_internal_create_wrapper_scripts\|qt-cmake\|qt-configure-module" git/depends/patches/qt/qtbase_skip_tools.patch

echo ""
echo "=== Full patch content around wrapper scripts ==="
sed -n '10,25p' git/depends/patches/qt/qtbase_skip_tools.patch

Length of output: 443


🏁 Script executed:

#!/bin/bash
# Find the patch file and examine it

echo "=== Finding qtbase_skip_tools.patch ==="
find . -name "qtbase_skip_tools.patch" -type f 2>/dev/null

echo ""
echo "=== List all patches in depends/patches/qt ==="
find depends/patches/qt -type f 2>/dev/null | head -20

echo ""
echo "=== Examine the actual qtbase_skip_tools.patch ==="
if [ -f "depends/patches/qt/qtbase_skip_tools.patch" ]; then
  cat depends/patches/qt/qtbase_skip_tools.patch | head -80
fi

Length of output: 3143


Wrapper scripts cannot be skipped—they are required by downstream Qt modules and other patches depend on them.

The patch removes the qt_internal_create_wrapper_scripts() call from QtBaseGlobalTargets.cmake, which prevents generation of qt-cmake and qt-configure-module wrapper scripts. However:

  1. Critical dependency: The dont_hardcode_pwd.patch patches qtbase/bin/qt-cmake.in and qtbase/bin/qt-configure-module.in—scripts that must exist for that patch to work. If wrapper script generation is skipped, dont_hardcode_pwd.patch will fail.

  2. Downstream modules: In cross-compilation scenarios (as evidenced by the depends/ directory structure), downstream Qt modules (qttools, qttranslations) use these wrapper scripts to configure themselves during the build.

  3. Other tools are safe to skip: The trace tools (tracepointgen, tracegen), parser generator (qlalr), and Vulkan header generator (qvkgen) have no references in the codebase and appear to be development-only; these can remain skipped.

Required change: Keep wrapper script generation enabled by either:

  • Removing the removal of qt_internal_create_wrapper_scripts() call, or
  • Applying dont_hardcode_pwd.patch before this patch and ensuring wrapper scripts are still generated
🤖 Prompt for AI Agents
In depends/patches/qt/qtbase_skip_tools.patch around lines 1-8, the patch
removed the qt_internal_create_wrapper_scripts() call which prevents generation
of qt-cmake and qt-configure-module wrapper scripts required by the
dont_hardcode_pwd.patch and downstream modules; restore wrapper script
generation by either reverting the removal of
qt_internal_create_wrapper_scripts() in this patch (keep skipping
tracepointgen/tracegen/qlalr/qvkgen only) or ensure dont_hardcode_pwd.patch is
applied before this patch and explicitly invoke
qt_internal_create_wrapper_scripts() so the wrapper scripts are generated for
downstream consumers.

Comment on lines +166 to 172
set(wallet_packages @wallet_packages@)
set(bdb_packages @bdb_packages@)
if("${wallet_packages}" STREQUAL "" OR "${bdb_packages}" STREQUAL "")
set(WITH_BDB OFF CACHE BOOL "")
else()
set(WITH_BDB ON CACHE BOOL "")
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Inconsistent pattern matching and redundant wallet_packages assignment.

Two issues:

  1. Inconsistent pattern matching: Lines 168-169 use STREQUAL "" instead of the MATCHES "^[ ]*$" pattern used elsewhere (lines 141, 148, 154, 160, 174). This contradicts the comment on lines 138-140 explaining why MATCHES should be used.

  2. Redundant assignment: Line 166 reassigns wallet_packages from @wallet_packages@, but this value was already checked using MATCHES on line 160. This duplication is unnecessary and potentially confusing.

Apply this diff to fix both issues:

-set(wallet_packages @wallet_packages@)
 set(bdb_packages @bdb_packages@)
-if("${wallet_packages}" STREQUAL "" OR "${bdb_packages}" STREQUAL "")
+if("@wallet_packages@" MATCHES "^[ ]*$" OR "${bdb_packages}" MATCHES "^[ ]*$")
   set(WITH_BDB OFF CACHE BOOL "")
 else()
   set(WITH_BDB ON CACHE BOOL "")
 endif()

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In depends/toolchain.cmake.in around lines 166 to 172, remove the redundant
re-assignment of wallet_packages at line 166 and change the conditional that
currently uses STREQUAL "" to instead use MATCHES "^[ ]*$" for both
wallet_packages and bdb_packages so it follows the same blank-string detection
pattern used elsewhere; keep setting bdb_packages from @bdb_packages@ if needed,
and set WITH_BDB ON/OFF based on the MATCHES checks.

Comment on lines 205 to 208
cd depends && make -j$(nproc) && cd ..
cmake -B build --toolchain depends/$(depends/config.guess)/toolchain.cmake -DENABLE_WALLET=OFF -DBUILD_GUI=OFF
cmake --build build -j$(nproc)
cd build && make test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Arch example: repository and parallelism tweaks.

  • Clone URL should point to firoorg/firo, not bitcoin/bitcoin.
  • Optional: keep using -j$(nproc) here (Linux), but consider getconf for portability if you want a single cross-OS snippet.

Proposed fixes:

-    git clone https://github.com/bitcoin/bitcoin.git
-    cd bitcoin/
+    git clone https://github.com/firoorg/firo.git
+    cd firo/

Optional portability:

-    cmake --build build -j$(nproc)
+    cmake --build build -j"$(getconf _NPROCESSORS_ONLN)"

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In doc/build-unix.md around lines 205 to 208, update the repository clone
reference to use the correct firoorg/firo URL instead of bitcoin/bitcoin, and
adjust the parallel build flags for portability by replacing -j$(nproc) with a
getconf-based form (e.g. -j$(getconf _NPROCESSORS_ONLN)) or add a short note
that -j$(nproc) is Linux-specific and getconf is more portable across UNIX-like
systems; keep the rest of the commands unchanged.

Comment on lines +191 to +192
// Request the background threads to shut down.
virtual void Shutdown();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Add Shutdown() forwarding to EnvWrapper.

The EnvWrapper class (lines 318-386) forwards all Env methods to the target, but doesn't include the new Shutdown() method. This breaks EnvWrapper's contract and prevents proper shutdown of the underlying environment when using a wrapper.

Add the following forwarding method to EnvWrapper (after line 382):

  void Shutdown() override {
    target_->Shutdown();
  }
🤖 Prompt for AI Agents
In src/leveldb/include/leveldb/env.h around lines 191 and the EnvWrapper
implementation region (approximately lines 318-386), EnvWrapper is missing a
forwarding implementation for the new virtual Shutdown() method; add a
Shutdown() override in EnvWrapper immediately after line 382 that simply calls
target_->Shutdown() so the wrapper properly forwards the shutdown request to the
underlying environment.

@aleflm aleflm force-pushed the dev-aleflm-update-qt6-rebased branch from 212ce38 to d0d1e88 Compare October 20, 2025 14:53
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
Dockerfile (1)

27-30: Prefer cmake --build for test execution instead of mixed make workflow.

Line 29 uses cd build && make test, which mixes CMake and Make commands. For consistency with the CMake-first workflow, use the CMake test command.

  RUN cmake -B build --toolchain depends/$(uname -m)-linux-gnu/toolchain.cmake -DBUILD_GUI=OFF -DBUILD_TESTS=ON && \
-     cmake --build build -j$(nproc) && \
-     cd build && make test && \
+     cmake --build build -j$(nproc) && \
+     cmake --build build --target test && \
      cmake --install build --prefix /tmp/firo/depends/$(uname -m)-linux-gnu
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 212ce38 and d0d1e88.

⛔ Files ignored due to path filters (1)
  • .github/workflows/ci-master.yml is excluded by !**/*.yml
📒 Files selected for processing (1)
  • Dockerfile (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: build-guix-x86_64-apple-darwin
  • GitHub Check: build-guix-arm64-apple-darwin
  • GitHub Check: build-guix-aarch64-linux-gnu
  • GitHub Check: build-guix-x86_64-w64-mingw32
  • GitHub Check: build-linux-cmake
  • GitHub Check: build-guix-x86_64-linux-gnu
  • GitHub Check: build-mac-cmake
  • GitHub Check: build-windows-cmake
  • GitHub Check: build
🔇 Additional comments (1)
Dockerfile (1)

6-14: I need to dig deeper into the depends build system to confirm whether autoconf and m4 are actually invoked there.

Based on my verification, I can now provide a definitive answer. Let me search for one more confirmation about the specific usage of autoconf in the depends system:

autoconf and m4 are necessary build dependencies and cannot be removed.

While Bitcoin Core's master branch migrated to CMake starting September 2024, the depends system—which builds third-party libraries (Tor, Boost, OpenSSL, BerkeleyDB, etc.)—still relies on Autotools-based configure scripts. The depends system uses make to coordinate building these packages, many of which invoke ./configure. The autoconf and m4 tools are required to generate and configure these upstream dependencies' build systems.

Removing these packages would break the depends build process and prevent compilation of the binary dependencies needed by Bitcoin Core, regardless of whether the main build system uses CMake.

@aleflm aleflm force-pushed the dev-aleflm-update-qt6-rebased branch 2 times, most recently from 5e7cdbf to a2e426f Compare October 21, 2025 01:19
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
contrib/debian/rules (1)

15-20: Critical: Debian packaging logic assigns qt4 to Ubuntu, contradicting Qt6 migration.

Line 15 sets Ubuntu-derived distributions to use qt4, while others use qt6. This is inconsistent with the PR's Qt6 migration objectives and uses an ancient, EOL'd Qt version (Qt4 reached end-of-life in 2015).

For Qt6 migration, the logic should be:

-QT=$(shell dpkg-vendor --derives-from Ubuntu && echo qt4 || echo qt6)
+QT=qt6

Or if Ubuntu needs special handling for backward compatibility:

-QT=$(shell dpkg-vendor --derives-from Ubuntu && echo qt4 || echo qt6)
+QT=$(shell dpkg-vendor --derives-from Ubuntu && echo qt5 || echo qt6)

However, given this is a Qt6 migration PR, all platforms should use qt6.

♻️ Duplicate comments (19)
depends/funcs.mk (3)

217-221: PKG_CONFIG_SYSROOT_DIR=/ — verify against toolchain; may misdirect pkg-config in cross builds.

Neighbors derive from $($($(1)_type)_prefix); hardcoding "/" can cause host paths to leak during cross. Confirm intended behavior and align with toolchain/sysroot config.

#!/bin/bash
# Inspect toolchain and host configs to decide correct SYSROOT.
set -euo pipefail

echo "== Look for CMAKE/Pkg-Config sysroot hints =="
fd -t f 'toolchain.cmake.in' depends | xargs -I{} sh -c 'echo --- {}; sed -n "1,200p" "{}" | rg -n "PKG_CONFIG|CMAKE_INSTALL_LIBDIR|SYSROOT|prefix" -n -C2 || true'

echo "== Hosts definitions mentioning cmake system/sysroot =="
rg -nC2 'cmake_system_name|SYSROOT|sysroot|_prefix\)' depends/hosts || true

echo "== Packages that set *_patches_path and *_local_dir (context for patch path & local src) =="
rg -nC1 '_patches_path|_local_dir' depends/packages || true

echo "== Sample .pc content under host_prefix (after one build) to check absolute vs relative prefixes =="
fd -t f '.pc$' -a | head -n 20 | xargs -r -I{} sh -c 'echo --- {}; sed -n "1,50p" "{}" | rg -n "prefix|Libs|Cflags" -n || true'

75-79: Hardcoded patch path breaks custom patch dirs; restore $(1)_patches_path usage.

Hashes and patch copying ignore per-package overrides; this can miss patches and skew recipe hashes. This was flagged earlier.

 define int_get_build_recipe_hash
-$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1))
+$(eval $(1)_patches_path?=$(PATCHES_PATH)/$(1))
+$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $($(1)_patches_path)/,$($(1)_patches)) | cut -d" " -f1))
 final_build_id_long+=:[$(1)_all_file_checksums]$(foreach checksum,$($(1)_all_file_checksums),$(shell echo ":$(checksum)")):
 $(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
 endef
@@
-	$(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
+	$(AT)$(foreach patch,$($(1)_patches),cd $($(1)_patches_path); cp $(patch) $($(1)_patch_dir) ;)

Also applies to: 304-305


83-92: $(1)_all_dependencies never initialized but used — breaks build graph and IDs.

Re-add the transitive dependency computation so configure/unpack works and IDs include deps. Previously reported.

 $(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
-# $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($(1)_dependencies)))
-# $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
+$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
 $(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))
depends/patches/native_qt/rcc_hardcode_timestamp.patch (1)

1-24: Critical: Patch contradicts Qt reproducible build best practices.

As noted in the previous review, this patch removes support for SOURCE_DATE_EPOCH and QT_RCC_SOURCE_DATE_OVERRIDE, which are Qt's recommended mechanisms for reproducible builds. The hardcoded timestamp approach is inflexible and contradicts Qt 6.7 best practices.

depends/hosts/darwin.mk (1)

70-70: Remove duplicate -platform_version flag from darwin_LDFLAGS.

Line 65 already sets -Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) in darwin_LDFLAGS. Line 70's append duplicates this flag, which can cause linker warnings.

Apply this diff:

-darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) -Wl,-no_adhoc_codesign -fuse-ld=lld
+darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-no_adhoc_codesign -fuse-ld=lld
depends/patches/qt/qtbase_skip_tools.patch (1)

16-17: Critical: Wrapper scripts must not be skipped—they are required by downstream Qt modules.

The removal of qt_internal_create_wrapper_scripts() prevents generation of qt-cmake and qt-configure-module wrapper scripts. These scripts are essential dependencies:

  • dont_hardcode_pwd.patch patches these wrapper scripts and will fail if they don't exist
  • Downstream Qt modules (qttools, qttranslations) require these wrappers during cross-compilation

Restore wrapper script generation:

 
-# Depends on the global features being evaluated.
-qt_internal_create_wrapper_scripts()
-
 add_library(Qt::GlobalConfig ALIAS GlobalConfig)
+
+# Depends on the global features being evaluated.
+qt_internal_create_wrapper_scripts()
src/qt/bitcoin.cpp (2)

497-502: Fix comment/timeout mismatch.

Comment states "500 milliseconds" but the code uses QTimer::singleShot(1000, ...) (1000ms). They should be consistent.

Apply this diff:

-    // Delay shutdown signal by 500 milliseconds
+    // Delay shutdown signal by 1000 milliseconds
     QTimer::singleShot(1000, this, [this]() {

Alternatively, if 500ms was intended, change the timer value to match.


233-234: Guard showCloseWindow() against null pointer dereference.

showCloseWindow() is declared public and unconditionally dereferences shutdownWindow at line 505. If called before requestShutdown() initializes shutdownWindow (line 480), this will crash.

Either make it private to prevent external misuse:

 public:
     // ... other public methods ...
     void requestShutdown();
 
-    void showCloseWindow();
-
     /// Get process return value
     int getReturnValue() { return returnValue; }
     
 // ... later in private section ...
 private:
     // ... other members ...
     std::unique_ptr<QWidget> shutdownWindow;
 
     void startThread();
+    void showCloseWindow();

Or add a null check:

 void BitcoinApplication::showCloseWindow(){
+    if (!shutdownWindow) {
+        return;  // or create it here
+    }
     shutdownWindow->show();
 }

Also applies to: 504-506

depends/patches/native_qt/qtbase_skip_tools.patch (1)

16-18: Do not remove qt_internal_create_wrapper_scripts(); restores required qt-* wrappers.

This call generates qt-cmake, qt-configure-module, etc., used during module configure. Without it, later Qt module config phases fail.

Apply:

 qt_generate_qmake_and_qtpaths_wrapper_for_target()

-# Depends on the global features being evaluated.
-qt_internal_create_wrapper_scripts()
-
+# Depends on the global features being evaluated.
+qt_internal_create_wrapper_scripts()
#!/bin/bash
# Ensure wrappers exist in build tree after configure
fd -a '^qt-(cmake|configure-module|toolchain)$' build -uu
README.md (2)

174-181: Remove stray command and fix broken code block structure.

Lines 174–181 contain a stray make -j$(nproc) command, orphaned code block delimiters, and old CMake instructions that don't belong in the current structure.

Apply this diff to fix the structure:

-If the build succeeded, binaries will be generated in `build/bin/`: `firod`, `firo-cli`, and if GUI is enabled, `firo-qt`.
-make -j$(nproc)
-```
-#### 3. Run GUI Client
-
-```
-./bin/firo-qt
+If the build succeeded, binaries will be generated in `build/bin/`: `firod`, `firo-cli`, and if GUI is enabled, `firo-qt`.

112-112: Update Qt5 packages to Qt6 equivalents.

The Debian/Ubuntu dependency list still references Qt5 packages (qttools5-dev qttools5-dev-tools), which conflicts with the Qt6 migration.

Apply this diff to update to Qt6 packages:

-sudo apt-get install qttools5-dev qttools5-dev-tools libxcb-xkb-dev bison
+sudo apt-get install qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libxcb-xkb-dev bison
src/qt/automintmodel.cpp (1)

105-105: Wrong wallet instance used for AvailableCoinsForLMint.

Line 105 calls AvailableCoinsForLMint on the global pwalletMain while UTXOs are gathered from the local wallet instance (lines 91–102). This can produce incorrect results in multi-wallet setups.

Apply this diff to use the correct wallet instance:

-        pwalletMain->AvailableCoinsForLMint(valueAndUTXOs, &coinControl);
+        wallet->AvailableCoinsForLMint(valueAndUTXOs, &coinControl);
src/qt/notificator.cpp (1)

149-152: Remove invalid .id() call for Qt6 compatibility.

In Qt6, qDBusRegisterMetaType<T>() returns an int directly, not an object with an .id() method. The current code will fail to compile.

Apply this diff:

 int FreedesktopImage::metaType()
 {
-    return qDBusRegisterMetaType<FreedesktopImage>().id();
+    return qDBusRegisterMetaType<FreedesktopImage>();
 }
depends/packages/native_qt.mk (1)

103-110: Undefined var $(package)_download_file in first fetch; use _file_name.

Breaks fetch. Align with other calls.

Apply:

-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \
src/qt/CMakeLists.txt (1)

57-74: Require LinguistTools before using Qt6::{lrelease,lupdate,lconvert}.

Add once near the top so imported tool targets exist.

Apply:

+find_package(Qt6 COMPONENTS LinguistTools REQUIRED)

Place this after project-wide Qt find or before the first use of Qt6::lrelease/lupdate.

depends/packages/qt.mk (4)

276-283: Undefined var $(package)_download_file in fetch; use _file_name.

Breaks fetch. Align with other calls.

Apply:

-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \

101-103: Conflicting zlib options (-system-zlib vs -qt-zlib). Pick one.

Keep only one; recommend system.

Apply:

 $(package)_config_opts += -system-zlib
-$(package)_config_opts += -qt-zlib

55-56: C++ standard mismatch: configure c++17 while enabling Qt C++20.

Align to C++20 to avoid feature/ABI mismatches.

Apply:

-$(package)_config_opts += -c++std c++17
+$(package)_config_opts += -c++std c++20

Also applies to: 196-199


138-141: Darwin opts overwritten by :=. Consolidate into a single block.

Second assignment clobbers earlier flags; merge.

Apply:

-$(package)_config_opts_darwin = -no-dbus
-$(package)_config_opts_darwin += -no-opengl
-$(package)_config_opts_darwin += -no-feature-corewlan
-$(package)_config_opts += -no-feature-vulkan
+$(package)_config_opts_darwin = -no-dbus
+$(package)_config_opts_darwin += -no-opengl
+$(package)_config_opts_darwin += -no-feature-corewlan
+$(package)_config_opts_darwin += -pch
+$(package)_config_opts_darwin += -no-feature-printsupport
+$(package)_config_opts_darwin += -no-freetype
+$(package)_config_opts_darwin += -no-pkg-config
+$(package)_config_opts_darwin += -no-feature-vulkan

And drop the later := block.

Also applies to: 163-169

🧹 Nitpick comments (12)
src/crypto/MerkleTreeProof/blake2/blake2b.c (1)

1-11: Consider standardizing the naming convention for consistency.

The symbol renaming macros use two different patterns: lines 1-7 use a prefix pattern (firo_blake2b_*), while lines 8-11 use a suffix pattern (blake2b_*_firo). While both approaches work, using a consistent pattern throughout would improve maintainability and reduce potential confusion.

Consider standardizing to the prefix pattern used in lines 1-7:

-#define blake2b blake2b_firo
-#define blake2b_long blake2b_long_firo
-#define blake2b_4r_update blake2b_4r_update_firo
-#define blake2b_4r_final blake2b_4r_final_firo
+#define blake2b firo_blake2b
+#define blake2b_long firo_blake2b_long
+#define blake2b_4r_update firo_blake2b_4r_update
+#define blake2b_4r_final firo_blake2b_4r_final
depends/funcs.mk (5)

15-16: Delay-evaluate release_type consistently in int_vars.

Use $$(release_type) (not $(release_type)) like other lines to avoid premature expansion.

-$(1)_arflags=$$($$($(1)_type)_ARFLAGS) \
-             $$($$($(1)_type)_$(release_type)_ARFLAGS)
+$(1)_arflags=$$($$($(1)_type)_ARFLAGS) \
+             $$($$($(1)_type)_$$(release_type)_ARFLAGS)

45-61: Large blocks of commented-out build plumbing — decide: enable or remove.

These introduce useful features (local dir sources, friendlier file names, default cmds) but are fully commented. Either wire them in (with tests) or drop to reduce maintenance noise.

Also applies to: 110-126, 149-158


143-143: Use $(build_TAR) for portability; avoid assuming system tar features.

Restore $(build_TAR) to ensure consistent flags across platforms/CI. GNU/bsdtar option differences can bite here.

-$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash)  $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash &&  $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --no-same-owner --strip-components=1 -xf $$($(1)_source)
+$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash)  $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash &&  $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_TAR) --no-same-owner --strip-components=1 -xf $$($(1)_source)
@@
-	$(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), tar xf $($(package)_cached); )
+	$(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), $(build_TAR) -xf $($(package)_cached); )
@@
-	$(AT)cd $$($(1)_staging_dir)/$(host_prefix); find . | sort | tar --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T -
+	$(AT)cd $$($(1)_staging_dir)/$(host_prefix); find . | sort | $(build_TAR) --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T -

Also applies to: 309-309, 330-331


263-271: Tighten CMake args: avoid which, drop trailing slash, make generator configurable.

  • CMAKE_INSTALL_LIBDIR should be "lib" (no slash).
  • Rely on PATH for AR/NM/RANLIB (or pass absolute if you have them), avoid runtime which.
  • Allow generator override via $(CMAKE_GENERATOR) with default.
-               cmake -G "Unix Makefiles" \
-               -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" \
-               -DCMAKE_AR=`which $$($(1)_ar)` \
-               -DCMAKE_NM=`which $$($(1)_nm)` \
-               -DCMAKE_RANLIB=`which $$($(1)_ranlib)` \
-               -DCMAKE_INSTALL_LIBDIR=lib/ \
+               cmake -G "$${CMAKE_GENERATOR:-Unix Makefiles}" \
+               -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" \
+               -DCMAKE_AR="$$($(1)_ar)" \
+               -DCMAKE_NM="$$($(1)_nm)" \
+               -DCMAKE_RANLIB="$$($(1)_ranlib)" \
+               -DCMAKE_INSTALL_LIBDIR=lib \
                -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
                -DCMAKE_VERBOSE_MAKEFILE:BOOL=$(V) \
                $$($(1)_config_opts)

26-28: Minor: avoid quadratic duplication in int_get_all_dependencies.

Use dep (not $(2)) inside foreach to cut redundant entries before sort.

-$(sort $(foreach dep,$(2),$(2) $(call int_get_all_dependencies,$(1),$($(dep)_dependencies))))
+$(sort $(foreach dep,$(2),$(dep) $(call int_get_all_dependencies,$(1),$($(dep)_dependencies))))
depends/patches/qt/qtbase_platformsupport.patch (1)

26-32: Redundant condition: (QT_FEATURE_libinput AND QT_FEATURE_xkbcommon) is subsumed by QT_FEATURE_libinput.

As written, OR (libinput AND xkbcommon) adds no effect because OR libinput already short‑circuits true. If the intent is to require both, drop the standalone libinput; otherwise remove the redundant clause.

Simplify to one of:

-    OR QT_FEATURE_libinput
-    OR QT_FEATURE_tslib
-    OR (QT_FEATURE_libinput AND QT_FEATURE_xkbcommon))
+    OR QT_FEATURE_libinput
+    OR QT_FEATURE_tslib)

or, if both are required:

-    OR QT_FEATURE_libinput
-    OR QT_FEATURE_tslib
-    OR (QT_FEATURE_libinput AND QT_FEATURE_xkbcommon))
+    OR (QT_FEATURE_libinput AND QT_FEATURE_xkbcommon)
+    OR QT_FEATURE_tslib)

Please confirm desired behavior.

depends/packages/packages.mk (1)

10-12: Use += to avoid clobbering qt_native_packages.

Assignment := overwrites prior contributors. Append instead to be composable with other includes.

-ifneq ($(host),$(build))
-qt_native_packages := native_qt
-endif
+ifneq ($(host),$(build))
+qt_native_packages += native_qt
+endif

Confirm nothing else sets qt_native_packages earlier. If so, += is safer.

depends/patches/native_qt/dont_hardcode_pwd.patch (1)

20-25: Use pwd -P to preserve physical-path semantics in Qt configure scripts.

The patch removes /bin/pwd (which resolves symlinks by default) and replaces it with pwd (a shell builtin that preserves logical paths). Qt's configure can misbehave if run from symlinked working directories; physical paths via pwd -P are needed for configure to see canonical locations, as many build/config scripts rely on physical PWD and confuse logical paths in comparisons.

Apply pwd -P to all three occurrences:

-relpath=`(cd "$relpath"; pwd)`
+relpath=`(cd "$relpath"; pwd -P)`
-outpath=`pwd`
+outpath=`pwd -P`
-script_dir_path=`(cd "$script_dir_path"; pwd)`
+script_dir_path=`(cd "$script_dir_path"; pwd -P)`

This preserves the original /bin/pwd intent (physical path resolution) while maintaining FHS compatibility (PATH-based pwd command lookup).

depends/packages/native_qt.mk (1)

42-49: Confirm -make tools is valid with Qt 6 configure -top-level.

Qt6’s configure moved away from some Qt5-era switches; this may be ignored or error depending on minor. If unnecessary, drop it and rely on feature toggles.

Would you like me to adjust the opts list after confirming the exact Qt minor you target?

src/qt/CMakeLists.txt (1)

268-287: Remove duplicate Boost::thread from firo-qt link list.

Harmless but noisy; clean it up.

Apply:

 target_link_libraries(firo-qt
   PUBLIC
     core_interface
     firoqt
-    Qt6::Widgets
+    Qt6::Widgets
     firo_node
     firo_cli
     univalue
     $<TARGET_NAME_IF_EXISTS:firo_wallet>
     $<$<BOOL:${WITH_ZMQ}>:firo_zmq>
-    Boost::thread
     Boost::filesystem
     Boost::thread
     Boost::program_options
depends/packages/qt.mk (1)

52-60: Minor flag duplication cleanup.

  • -no-egl appears twice.
  • -no-zstd appears twice.
  • Linux has -dbus-runtime twice.

Apply:

-$(package)_config_opts = -no-egl
+$(package)_config_opts =
...
-$(package)_config_opts += -no-egl
+$(package)_config_opts += -no-egl
...
-$(package)_config_opts += -no-zstd
...
-$(package)_config_opts += -no-zstd
+# (keep a single -no-zstd)
...
-$(package)_config_opts_linux += -dbus-runtime
...
-$(package)_config_opts_linux += -dbus-runtime
+# (keep a single -dbus-runtime)

Also applies to: 88-89, 170-181

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0d1e88 and a2e426f.

⛔ Files ignored due to path filters (1)
  • .github/workflows/ci-master.yml is excluded by !**/*.yml
📒 Files selected for processing (98)
  • CMakeLists.txt (1 hunks)
  • Dockerfile (3 hunks)
  • Makefile.am (0 hunks)
  • README.md (7 hunks)
  • autogen.sh (0 hunks)
  • build-aux/m4/ax_boost_base.m4 (0 hunks)
  • build-aux/m4/ax_boost_chrono.m4 (0 hunks)
  • build-aux/m4/ax_boost_filesystem.m4 (0 hunks)
  • build-aux/m4/ax_boost_program_options.m4 (0 hunks)
  • build-aux/m4/ax_boost_system.m4 (0 hunks)
  • build-aux/m4/ax_boost_thread.m4 (0 hunks)
  • build-aux/m4/ax_boost_unit_test_framework.m4 (0 hunks)
  • build-aux/m4/ax_check_compile_flag.m4 (0 hunks)
  • build-aux/m4/ax_check_link_flag.m4 (0 hunks)
  • build-aux/m4/ax_check_preproc_flag.m4 (0 hunks)
  • build-aux/m4/ax_cxx_compile_stdcxx.m4 (0 hunks)
  • build-aux/m4/ax_gcc_func_attribute.m4 (0 hunks)
  • build-aux/m4/ax_pthread.m4 (0 hunks)
  • build-aux/m4/ax_subdirs_configure.m4 (0 hunks)
  • build-aux/m4/bitcoin_find_bdb48.m4 (0 hunks)
  • build-aux/m4/bitcoin_qt.m4 (0 hunks)
  • build-aux/m4/bitcoin_subdir_to_include.m4 (0 hunks)
  • build-aux/m4/l_atomic.m4 (0 hunks)
  • cmake/module/FindQt.cmake (0 hunks)
  • configure.ac (0 hunks)
  • contrib/debian/changelog (1 hunks)
  • contrib/debian/rules (1 hunks)
  • contrib/guix/libexec/build.sh (1 hunks)
  • contrib/rpm/README.md (1 hunks)
  • contrib/rpm/bitcoin.spec (3 hunks)
  • depends/Makefile (3 hunks)
  • depends/config.site.in (1 hunks)
  • depends/funcs.mk (7 hunks)
  • depends/hosts/darwin.mk (1 hunks)
  • depends/packages/libxcb_util_cursor.mk (1 hunks)
  • depends/packages/native_qt.mk (1 hunks)
  • depends/packages/packages.mk (1 hunks)
  • depends/packages/qt.mk (2 hunks)
  • depends/packages/qt_details.mk (1 hunks)
  • depends/packages/zeromq.mk (1 hunks)
  • depends/patches/native_qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/native_qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/native_qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/native_qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/native_qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/patches/qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/qt/memory_resource.patch (0 hunks)
  • depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_qmain.patch (1 hunks)
  • depends/patches/qt/qtbase_platformsupport.patch (1 hunks)
  • depends/patches/qt/qtbase_plugins_cocoa.patch (1 hunks)
  • depends/patches/qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/toolchain.cmake.in (3 hunks)
  • doc/build-unix.md (5 hunks)
  • doc/man/Makefile.am (0 hunks)
  • libbitcoinconsensus.pc.in (0 hunks)
  • src/Makefile.am (0 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2.h (1 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2b.c (1 hunks)
  • src/init.cpp (2 hunks)
  • src/leveldb/include/leveldb/env.h (1 hunks)
  • src/leveldb/util/env.cc (1 hunks)
  • src/leveldb/util/env_posix.cc (3 hunks)
  • src/leveldb/util/env_windows.cc (3 hunks)
  • src/qt/CMakeLists.txt (8 hunks)
  • src/qt/automintmodel.cpp (2 hunks)
  • src/qt/bitcoin.cpp (4 hunks)
  • src/qt/bitcoinamountfield.cpp (1 hunks)
  • src/qt/bitcoingui.cpp (8 hunks)
  • src/qt/clientmodel.cpp (3 hunks)
  • src/qt/coincontroldialog.cpp (1 hunks)
  • src/qt/guiutil.cpp (5 hunks)
  • src/qt/notificator.cpp (3 hunks)
  • src/qt/recentrequeststablemodel.cpp (1 hunks)
  • src/qt/recentrequeststablemodel.h (1 hunks)
  • src/qt/rpcconsole.cpp (3 hunks)
  • src/qt/sendcoinsentry.cpp (2 hunks)
  • src/qt/splashscreen.cpp (1 hunks)
  • src/qt/test/CMakeLists.txt (1 hunks)
  • src/qt/transactionfilterproxy.cpp (1 hunks)
  • src/qt/transactiontablemodel.cpp (2 hunks)
  • src/qt/utilitydialog.cpp (2 hunks)
  • src/qt/winshutdownmonitor.cpp (1 hunks)
  • src/qt/winshutdownmonitor.h (1 hunks)
  • src/secp256k1/Makefile.am (0 hunks)
  • src/secp256k1/build-aux/m4/ax_jni_include_dir.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/bitcoin_secp.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/m4_ax_cxx_compile_stdcxx.m4 (0 hunks)
  • src/secp256k1/configure.ac (0 hunks)
  • src/univalue/Makefile.am (0 hunks)
  • src/univalue/autogen.sh (0 hunks)
  • src/univalue/build-aux/m4/.gitignore (0 hunks)
  • src/univalue/configure.ac (0 hunks)
💤 Files with no reviewable changes (36)
  • src/secp256k1/build-aux/m4/m4_ax_cxx_compile_stdcxx.m4
  • build-aux/m4/ax_pthread.m4
  • autogen.sh
  • Makefile.am
  • libbitcoinconsensus.pc.in
  • src/univalue/configure.ac
  • src/secp256k1/build-aux/m4/bitcoin_secp.m4
  • build-aux/m4/ax_gcc_func_attribute.m4
  • configure.ac
  • depends/patches/qt/memory_resource.patch
  • build-aux/m4/ax_check_compile_flag.m4
  • build-aux/m4/ax_subdirs_configure.m4
  • build-aux/m4/ax_check_link_flag.m4
  • build-aux/m4/bitcoin_find_bdb48.m4
  • src/univalue/autogen.sh
  • build-aux/m4/bitcoin_subdir_to_include.m4
  • build-aux/m4/ax_boost_thread.m4
  • src/secp256k1/configure.ac
  • build-aux/m4/ax_boost_system.m4
  • src/secp256k1/Makefile.am
  • build-aux/m4/ax_boost_chrono.m4
  • build-aux/m4/l_atomic.m4
  • build-aux/m4/ax_boost_base.m4
  • src/univalue/build-aux/m4/.gitignore
  • build-aux/m4/ax_check_preproc_flag.m4
  • build-aux/m4/ax_boost_unit_test_framework.m4
  • build-aux/m4/ax_boost_program_options.m4
  • src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4
  • build-aux/m4/bitcoin_qt.m4
  • src/univalue/Makefile.am
  • cmake/module/FindQt.cmake
  • doc/man/Makefile.am
  • src/secp256k1/build-aux/m4/ax_jni_include_dir.m4
  • build-aux/m4/ax_boost_filesystem.m4
  • build-aux/m4/ax_cxx_compile_stdcxx.m4
  • src/Makefile.am
🚧 Files skipped from review as they are similar to previous changes (26)
  • src/qt/recentrequeststablemodel.h
  • src/init.cpp
  • contrib/guix/libexec/build.sh
  • contrib/rpm/bitcoin.spec
  • src/qt/recentrequeststablemodel.cpp
  • src/qt/transactionfilterproxy.cpp
  • src/leveldb/include/leveldb/env.h
  • src/qt/transactiontablemodel.cpp
  • contrib/rpm/README.md
  • src/qt/coincontroldialog.cpp
  • depends/patches/qt/qttools_skip_dependencies.patch
  • src/qt/clientmodel.cpp
  • depends/toolchain.cmake.in
  • src/qt/bitcoinamountfield.cpp
  • src/leveldb/util/env.cc
  • depends/packages/qt_details.mk
  • contrib/debian/changelog
  • src/crypto/MerkleTreeProof/blake2/blake2.h
  • src/qt/test/CMakeLists.txt
  • doc/build-unix.md
  • depends/patches/qt/qtbase_avoid_qmain.patch
  • src/qt/guiutil.cpp
  • depends/patches/qt/rcc_hardcode_timestamp.patch
  • src/qt/winshutdownmonitor.h
  • depends/patches/native_qt/qttools_skip_dependencies.patch
  • depends/Makefile
🧰 Additional context used
🧬 Code graph analysis (2)
src/leveldb/util/env_windows.cc (1)
src/leveldb/util/env_posix.cc (1)
  • shutdown_requested_ (732-735)
src/leveldb/util/env_posix.cc (1)
src/leveldb/util/env_windows.cc (1)
  • shutdown_requested_ (680-683)
🪛 markdownlint-cli2 (0.18.1)
README.md

174-174: Hard tabs
Column: 1

(MD010, no-hard-tabs)

🔇 Additional comments (34)
src/crypto/MerkleTreeProof/blake2/blake2b.c (1)

1-11: Header file macros verified as matching.

The verification confirms that src/crypto/MerkleTreeProof/blake2/blake2.h contains identical macro definitions to those in the .c file. All 11 symbol-renaming macros align perfectly, preventing any linking errors or symbol mismatches.

src/leveldb/util/env_windows.cc (1)

680-683: LGTM! Shutdown mechanism correctly implemented.

The graceful shutdown implementation is thread-safe and correct:

  • The atomic shutdown_requested_ flag with SignalAll() properly synchronizes shutdown signaling
  • The check in BackgroundThreadMain (lines 777-780) occurs while holding the mutex, after waking from the condition variable, ensuring the flag is observed
  • Pending work in the queue will be processed before shutdown (check only happens when queue is empty)
  • The pattern matches the POSIX implementation in env_posix.cc, ensuring cross-platform consistency

Also applies to: 709-709, 777-780

src/leveldb/util/env_posix.cc (1)

732-735: LGTM! POSIX shutdown implementation mirrors Windows version.

The shutdown mechanism is correctly implemented and identical in structure to the Windows implementation in env_windows.cc (lines 680-683, 709, 777-780):

  • Atomic flag shutdown_requested_ properly initialized
  • Shutdown() sets the flag and signals the condition variable to wake the background thread
  • BackgroundThreadMain checks the flag while holding the mutex in the wait loop
  • Cross-platform consistency ensures maintainable and predictable behavior

Also applies to: 768-768, 827-830

depends/funcs.mk (1)

276-279: Variable is defined for all supported hosts; review concern is not applicable.

Verification confirms that $($(host_os)_cmake_system_name) is properly defined for all actively supported platforms:

  • darwin_cmake_system_name=Darwin (depends/hosts/darwin.mk)
  • linux_cmake_system_name=Linux (depends/hosts/linux.mk)
  • mingw32_cmake_system_name=Windows (depends/hosts/mingw32.mk)

Only three host files exist in depends/hosts/, and each defines its corresponding _cmake_system_name variable. Unsupported OS platforms would fail earlier during the include hosts/$(host_os).mk step (depends/Makefile:115) before reaching line 276-279, so undefined variables at that location are not a practical concern for supported builds.

src/qt/sendcoinsentry.cpp (1)

19-21: LGTM! Correct Qt6 migration from QRegExp to QRegularExpression.

The replacement of the deprecated QRegExp with QRegularExpression is necessary for Qt6 compatibility. The character class pattern [\\x00-\\x1F\\x7F] for removing control characters works identically with both APIs.

Also applies to: 88-88

src/qt/utilitydialog.cpp (1)

27-27: LGTM! Proper Qt6 regex migration with correct non-greedy matching.

The migration from QRegExp with setMinimal(true) to QRegularExpression with the inline non-greedy quantifier .*? is correct and produces identical matching behavior for URL extraction in the license text.

Also applies to: 57-59

src/qt/winshutdownmonitor.cpp (1)

19-19: LGTM! Required Qt6 API signature change.

The parameter type change from long* to qintptr* is mandatory for Qt6 compatibility. Qt6 updated QAbstractNativeEventFilter::nativeEventFilter to use qintptr* for better cross-platform type safety.

depends/packages/zeromq.mk (1)

17-17: LGTM! Improved shell quoting for robustness.

Quoting $(LIBRARY_PATH) prevents potential word-splitting issues if the path contains spaces, following shell scripting best practices.

depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch (1)

1-17: The patch remains necessary for Qt 6.7.3.

The _GLIBCXX_VISIBILITY macro causes moc parse errors, and QTBUG-83160 remains in "Reported" status with no evidence of resolution in recent Qt versions. Qt 6.7.3 was released with 400+ bug fixes, but no fix for this issue is documented. The workaround follows the established pattern of ignoring compiler-specific macros in moc's macro preprocessing.

CMakeLists.txt (1)

248-250: Upgrade to Qt 6.8 LTS before standard support for Qt 6.7 closes.

Qt 6.7.3's standard support ended March 26, 2025, while Qt 6.8 LTS provides commercial support through October 8, 2029 with ongoing patches and security fixes. Qt 6.7 non-LTS is not recommended for products that must remain on a single Qt minor for many years. For a production cryptocurrency wallet, Qt 6.8 LTS is the recommended choice for long-lived commercial products, offering longer support, predictable maintenance, and easier regulatory/SBOM support.

depends/patches/qt/qtbase_plugins_cocoa.patch (1)

1-21: LGTM! Valid workaround for CMake issue 23464.

The patch correctly addresses a known CMake precompiled header issue affecting macOS Cocoa plugin builds when using CMake < 3.25 without session manager support. The upstream reference confirms this is an accepted workaround.

depends/patches/qt/qtbase_avoid_native_float16.patch (1)

1-37: LGTM! Valid compatibility workaround for libgcc < 12.

The patch correctly disables native float16 support to avoid binary compatibility issues on Linux platforms with older libgcc versions. The upstream GCC commit reference confirms the rationale.

Note: Track this patch for removal once the minimum libgcc requirement is updated to 12.x or newer, as stated in lines 8-9.

depends/config.site.in (1)

65-67: LGTM! Correct Qt5 → Qt6 migration in debug GUI selection.

The change from qt5_debug to qt6_debug correctly aligns the debug build GUI selection with the broader Qt6 migration effort across the codebase.

depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (1)

1-17: LGTM! Valid workaround for moc/GCC internal macro conflict.

The patch correctly adds _GLIBCXX_VISIBILITY to the list of ignored variadic macros in moc, following the same pattern as __attribute__ and __declspec__. This addresses the upstream bug QTBUG-83160 where moc incorrectly processes GCC internal macros.

src/qt/splashscreen.cpp (1)

24-24: Include migration to Qt6 API is correct; no active deprecated usages remain.

The replacement of QDesktopWidget with QScreen is required for Qt6 compatibility. Verification confirms no active usages of QApplication::desktop() or QDesktopWidget in the codebase—the only reference is commented-out code at line 180, which does not represent an active migration concern.

depends/patches/native_qt/qtbase_skip_tools.patch (1)

57-59: No downstream dependencies on removed tools found—review comment does not apply to this build configuration.

Verification shows qlalr and qvkgen are referenced only within the patch files themselves, with no consumers elsewhere in the Bitcoin Core depends system. This patch is already established (exists in both native_qt and qt subdirectories), indicating it has been validated as safe for the project's build configuration. The tools removed are optional Qt build-time utilities not required by modules in this specific build.

Likely an incorrect or invalid review comment.

depends/patches/native_qt/qtbase_avoid_native_float16.patch (1)

14-36: Now I need to explore the repository structure to properly verify the patch and find references to the float16 symbols:

Based on my verification research, I cannot access the repository to inspect the patch file itself or verify the actual codebase references. However, the web search results confirm that QFLOAT16_IS_NATIVE define affects qfloat16 constructor availability which can differ across platforms and compilers, and GCC 12 added _Float16 type support on x86 systems with SSE2 enabled.

The review comment's core concern—that unconditionally disabling native float16 is overly broad—is technically valid: conversion between float16 and float is performed by hardware when possible, but on processors without native support, it uses lookup table operations, meaning forcing non-native mode degrades performance on capable systems.

However, without access to the actual patch file, the repository structure, or the specific justification for this change (e.g., a bug report referencing Clang issue #56963 or other compiler problems), I cannot definitively verify whether the review comment's suggested fix (gating to "GCC < 12") is appropriate or whether the unconditional disable is actually necessary to resolve a critical compilation issue.

depends/packages/packages.mk (1)

6-8: No changes required—xcb-util-cursor is available on FreeBSD and already correctly configured.

FreeBSD provides the xcb-util-cursor port, and the codebase already includes libxcb_util_cursor in both qt_linux_packages and qt_freebsd_packages via dependency inheritance in qt.mk. The package recipe exists and no FreeBSD-specific exclusions or patches are needed.

src/qt/rpcconsole.cpp (3)

499-507: LGTM! Correct Qt6 event forwarding pattern.

The refactor from copying QKeyEvent to constructing a new event mirrors all necessary fields (type, key, modifiers, text, isAutoRepeat, count) and is the correct approach for Qt6, where event copying is deprecated.


514-522: LGTM! Consistent event forwarding for Return/Enter keys.

This change applies the same Qt6-compatible event construction pattern for Return/Enter key forwarding from the autocompleter popup.


534-542: LGTM! General key forwarding updated for Qt6.

The general key forwarding from messagesWidget to lineEdit correctly uses the new event construction pattern for Qt6 compatibility.

depends/patches/qt/dont_hardcode_pwd.patch (1)

1-51: LGTM! Good portability improvement.

This patch correctly removes hardcoded /bin/pwd paths in favor of PATH-based lookup, improving portability on non-FHS systems like Guix. The changes are well-documented and align with the upstream Qt commit referenced.

Dockerfile (3)

2-2: LGTM! Base image updated to Debian Bookworm.

The upgrade from bullseye to bookworm provides access to newer tooling required for the Qt6 and CMake migration.


6-14: LGTM! Added CMake and build dependencies.

The additional packages (autoconf, cmake, file, m4) support the new CMake-based build workflow.


27-30: LGTM! Migrated to CMake build workflow.

The Dockerfile now correctly uses the CMake-based build process (configure, build, test, install) that aligns with the repository's migration away from autotools.

src/qt/bitcoingui.cpp (5)

45-45: LGTM! Added required include.

The QActionGroup include is correctly added to support the tab group functionality used in createActions().


314-364: LGTM! Keyboard shortcuts updated for Qt6 cross-platform compatibility.

The migration from hardcoded key combinations to QString("Alt+%1").arg(key++) improves cross-platform consistency and aligns with Qt6 best practices for dynamic shortcut assignment.


389-389: LGTM! Correct operator for Qt6 key modifiers.

Using Qt::CTRL | Qt::Key_Q (bitwise OR) instead of + is the correct Qt6 syntax for combining modifiers with keys.


462-463: LGTM! Consistent use of bitwise OR for shortcuts.

The debug window shortcuts now correctly use Qt::CTRL | Qt::SHIFT | Qt::Key_C/D syntax for Qt6.


554-554: LGTM! Migrated to Qt6 datetime API.

QDateTime::fromSecsSinceEpoch() correctly replaces the deprecated fromTime_t() for Qt6.

src/qt/notificator.cpp (1)

30-85: LGTM! Well-structured DBus type registration.

The centralized FreedesktopImage class definition with proper DBus marshalling operators and the registration call in the constructor (lines 82–84) correctly integrate the custom type into Qt6's DBus system.

depends/packages/libxcb_util_cursor.mk (1)

1-31: LGTM! Standard dependency package for Qt6 migration.

This package file follows the repository's conventions for dependency management. The version (0.1.5), SHA256 hash, dependencies, and build lifecycle are correctly specified. The static library configuration aligns with the project's dependency-building strategy.

depends/packages/qt.mk (1)

149-161: Qt Tools build intent: double-check -nomake tools vs Linguist usage.

You disable building tools but also set Qt Tools toggles when host==build. If you expect Qt6::lrelease from your depends-built Qt on host==build, drop -nomake tools or ensure system Qt provides LinguistTools.

I can adjust flags once you confirm the desired source for lrelease/lupdate on native builds.

Also applies to: 91-92

src/qt/CMakeLists.txt (1)

385-407: Python3::Interpreter is already discoverable—no action needed.

The target is found in the parent CMakeLists.txt (line 794) before the src subdirectory is added (line 882), which triggers src/qt addition. CMake targets created by find_package() are global and accessible to all subdirectories processed after the call. The code is correct as-is.

Likely an incorrect or invalid review comment.

Comment on lines +155 to +158
define $(package)_postprocess_cmds
rm -rf doc/ && \
mv translations/ ..
endef
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Guard the translations move to avoid failing when directory is absent.

mv translations/ .. will error if translations/ doesn’t exist, aborting the step.

Apply:

-  rm -rf doc/ && \
-  mv translations/ ..
+  rm -rf doc/ && \
+  if [ -d translations ]; then mv translations ..; fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
define $(package)_postprocess_cmds
rm -rf doc/ && \
mv translations/ ..
endef
define $(package)_postprocess_cmds
rm -rf doc/ && \
if [ -d translations ]; then mv translations ..; fi
endef
🤖 Prompt for AI Agents
In depends/packages/native_qt.mk around lines 155 to 158, the postprocess step
unconditionally runs "mv translations/ .." which will fail if the translations/
directory is missing; change the recipe to only move translations when it exists
(e.g., test -d translations && mv translations ..) or use a move that ignores
missing source (e.g., mv translations .. 2>/dev/null || true) so the step won't
abort when translations/ is absent.

Comment on lines +191 to +195
$(package)_config_env := CC="$$($(package)_cc)"
$(package)_config_env += CXX="$$($(package)_cxx)"
$(package)_config_env_darwin := OBJC="$$($(package)_cc)"
$(package)_config_env_darwin += OBJCXX="$$($(package)_cxx)"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Darwin OBJC/OBJCXX env defined but never used.

Include $(package)_config_env_darwin when running configure/build so Apple toolchains pick up the right compilers/flags.

Apply:

 define $(package)_config_cmds
   cd qtbase && \
-  $($(package)_config_env) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
+  $($(package)_config_env) $($(package)_config_env_darwin) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
 endef

 define $(package)_build_cmds
-  $($(package)_config_env) cmake --build . -- $$(filter -j%,$$(MAKEFLAGS))
+  $($(package)_config_env) $($(package)_config_env_darwin) cmake --build . -- $$(filter -j%,$$(MAKEFLAGS))
 endef

Also applies to: 343-349

🤖 Prompt for AI Agents
In depends/packages/qt.mk around lines 191 to 195, the Darwin-specific variables
$(package)_config_env_darwin (OBJC/OBJCXX) are set but never used; update the
configure/build invocation to include $(package)_config_env_darwin when building
on Darwin (e.g., wrap the configure/build command so it prepends
$(package)_config_env_darwin on darwin hosts or merge into the env variable when
HOST is darwin), ensuring Apple toolchain compilers/flags are actually applied;
apply the same change to the analogous block at lines 343-349.

Comment on lines +41 to +49
+++ b/qtbase/src/CMakeLists.txt
@@ -21,8 +21,6 @@ function(find_or_build_bootstrap_names)
endif()
add_subdirectory(tools/moc)
add_subdirectory(tools/rcc)
- add_subdirectory(tools/tracepointgen)
- add_subdirectory(tools/tracegen)
add_subdirectory(tools/cmake_automoc_parser)
endfunction()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Removing tracepoint generators may break builds when trace features are on. Gate by feature.

tools/tracepointgen and tools/tracegen are used when tracepoints are enabled. If you don’t also disable the corresponding features, this can fail later.

If kept, guard removes with feature checks or pass -DQT_BUILD_TRACE_TOOLS=OFF (or equivalent) in Qt configure.


🏁 Script executed:

#!/bin/bash
# Check for tracepoint usage in qtbase sources
rg -n 'tracepoint|TRACEPOINT|qt_trace' qtbase -S -C2
# Check CMake feature toggles present in your Qt configure
rg -n 'FEATURE_.*trace' qtbase/cmake -S

Length of output: 99


I need to examine the patch file and search the repository more broadly. Let me verify the repository structure and look for trace-related configurations.


---

🏁 Script executed:

```shell
#!/bin/bash
# First, find the patch file and examine it
find . -name "qtbase_skip_tools.patch" -type f

# Search for any cmake files that might reference trace features
rg -n 'trace' --type=cmake -C2

# Look for CMakeLists.txt files that might define feature toggles
fd CMakeLists.txt | head -20

# Search for QT_BUILD or trace-related options
rg -n 'QT_BUILD_TRACE|FEATURE.*trace|trace.*FEATURE' -S

Length of output: 5325


Let me examine the actual patch file to understand the context better:


---

🏁 Script executed:

```shell
#!/bin/bash
# Examine the patch file
cat ./depends/patches/native_qt/qtbase_skip_tools.patch

# Also check the Qt CMakeLists configuration in depends
fd -e cmake -e txt . depends/qt 2>/dev/null | head -10

# Search for how Qt is built/configured
rg -n 'qt_configure|CMAKE.*QT' depends/ -S -i

Length of output: 9303


Let me check how Qt is configured and if tracepoint features are enabled:


---

🏁 Script executed:

```shell
#!/bin/bash
# Check Qt build configuration options
cat depends/packages/qt.mk | grep -A 200 "cmake_opts"

# Look specifically for trace/tracepoint feature flags
rg -n 'FEATURE.*trace|USDT|TRACE' depends/packages/ -i

# Check if Qt itself has feature gates for trace tools
rg -n 'QT_FEATURE_trace' depends/ -S -i

Length of output: 11924


Let me search for whether these Qt trace tools have feature gates in the actual Qt source configuration:


---

🏁 Script executed:

```shell
#!/bin/bash
# Search for feature gates that might control trace tools in Qt
rg -n 'tracepointgen|tracegen|QT_FEATURE' depends/patches/native_qt/ depends/patches/qt/

# Check if there's any conditional logic around these tools
rg -n 'if.*trace|if.*FEATURE' depends/patches/native_qt/qtbase_skip_tools.patch

# Look for any build system documentation about trace features
find depends -name "*.md" -o -name "README*" | xargs grep -l trace 2>/dev/null || echo "No trace mentions in docs"

# Check git history or comments about why this patch was created
head -20 depends/patches/native_qt/qtbase_skip_tools.patch

Length of output: 3326


Let me search for Qt documentation or comments about when these trace tools are actually needed:


---

🌐 Web query:

```web
Qt tracepointgen tracegen tools feature conditional build requirements

💡 Result:

Short answer: tracegen/tracepointgen are Qt host tools (built from qtbase/src/tools/tracegen) used to generate and consume Qt tracepoint providers. They are only built when tracing support is enabled and the tracing-related system/dev libraries are available — specifically you must enable Qt’s LTTng trace support at configure time and have the LTTng user‑space libraries/headers installed. In practice:

  • Configure Qt with tracing enabled (e.g. configure -trace lttng or enable the corresponding CMake feature). The build system will skip building trace tools if trace/LTTng feature is turned off. [1][2]
  • Install LTTng UST (lttng-ust) development packages (and lttng-tools on the target for recording). If CMake/configure cannot find LTTng (or related libs), it will report “Could NOT find LTTngUST” and tracing tools/headers won’t be enabled. [2][3]
  • tracegen is built as a host tool (libexec/tracegen) — you need a host build of the Qt base tools to produce it; some Qt tools also require other host features (e.g. Qt base/tools packaging) so ensure host Qt build includes the tools you need. [4]

If you want concrete commands:

  • Install lttng-ust-dev (or your distro’s dev package) and lttng-tools on the device.
  • Reconfigure Qt: ./configure -trace lttng (or pass the equivalent CMake feature flags) and then build; check configure output for LTTng detection. [1][2]

References:

  • Qt Creator / building Qt with tracepoints (trace + LTTng notes). [1]
  • Qt configure / feature list and “Could NOT find LTTngUST” example from configure output. [2][3]

If you want, tell me your OS/distro and Qt version and I’ll give the exact package names and configure flags/commands.


Let me verify if this patch has been successfully applied and if there are any existing issues:


---

🏁 Script executed:

```shell
#!/bin/bash
# Check if patch is documented as applied
ls -la depends/patches/native_qt/qtbase_skip_tools.patch

# Look for any Qt trace feature documentation or configuration
rg -n 'trace.*feature|feature.*trace|lttng|LTTng' depends/ -i

# Check if there's any CI/build system that tests with trace enabled
rg -n 'WITH_USDT|trace.*ON|LTTng' . -i --type=cmake --type=mk 2>/dev/null | head -20

Length of output: 948


Gate trace tool removal by feature flag to prevent build failures if tracing is later enabled.

The patch removes tools/tracepointgen and tools/tracegen unconditionally, but these tools are only needed when Qt's tracing support is enabled. Currently this works because no trace features are configured in depends/packages/qt.mk or depends/packages/native_qt.mk. However, if someone later enables Qt trace features (e.g., via -DQT_FEATURE_trace=ON), the build will fail.

Other optional Qt tools in the same CMakeLists follow a pattern of gating with QT_FEATURE_* conditionals (e.g., dbus tools). Either:

  • Add a feature gate to the patch (wrap removals with if(NOT QT_FEATURE_trace))
  • Or explicitly pass -DQT_FEATURE_trace=OFF in Qt configure to document that tracing is intentionally disabled
🤖 Prompt for AI Agents
In depends/patches/native_qt/qtbase_skip_tools.patch around lines 41 to 49, the
patch unconditionally removes tools/tracepointgen and tools/tracegen which
breaks builds if Qt tracing is later enabled; gate these removals with a
build-time feature check or explicitly disable the feature: either wrap the
add_subdirectory(...) removals in an if(NOT QT_FEATURE_trace) ... endif() block
so the trace tools remain when trace support is enabled, or instead ensure Qt is
configured with -DQT_FEATURE_trace=OFF in the packaging/configure invocation and
document that choice.

@aleflm aleflm force-pushed the dev-aleflm-update-qt6-rebased branch 2 times, most recently from a67ad76 to f216944 Compare October 21, 2025 01:40
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
Dockerfile (3)

2-2: Verify Debian Bookworm compatibility with Qt6 and project requirements.

The base image upgrade from Debian bullseye (11) to bookworm (12) is a significant jump. While reasonable for a Qt6 migration, confirm that all system libraries, Qt6 dependencies, and toolchain components work correctly on bookworm, especially for the CMake-based cross-compilation workflow using the depends toolchain.

Consider documenting the Debian version rationale in a comment or commit message for future reference, particularly if bookworm has specific Qt6 library versions or system package availability that drove this choice.

Also applies to: 41-41


5-19: Verify necessity of Autotools packages in CMake-based build.

The Dockerfile retains automake and libtool (lines 7, 13) while the main build process has migrated to CMake (line 29). The depends build (line 27) still uses make, but clarify whether autotools are still required for the depends build or if they can be removed entirely to reduce layer size.

Run a test build with automake and libtool removed to verify they're no longer needed. If they can be removed, simplify the package list and reduce the image footprint. The newly added packages (cmake, patch, lbzip2, bzip2, file, m4) align well with CMake and cross-compilation workflows.


29-32: Verify CMake install prefix and binary deployment paths.

The CMake build installs to depends/$(uname -m)-linux-gnu (matching the depends layout), but confirm that:

  1. The toolchain file exists at the specified path and is properly configured for cross-compilation
  2. Binaries end up at ./depends/$(uname -m)-linux-gnu/bin/firod and ./depends/$(uname -m)-linux-gnu/bin/firo-cli as expected by the subsequent copy commands (lines 37-38)
  3. Test execution inside the build directory context (cd build && make test) works correctly

Consider adding a verification step to list the actual binary paths after installation to catch any deployment mismatches early. Example:

     cmake --install . --prefix /tmp/firo/depends/$(uname -m)-linux-gnu
+    ls -la /tmp/firo/depends/$(uname -m)-linux-gnu/bin/
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a2e426f and f216944.

⛔ Files ignored due to path filters (1)
  • .github/workflows/ci-master.yml is excluded by !**/*.yml
📒 Files selected for processing (1)
  • Dockerfile (3 hunks)

@aleflm aleflm force-pushed the dev-aleflm-update-qt6-rebased branch 2 times, most recently from 0e74030 to d03d1b9 Compare October 21, 2025 08:04
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
contrib/debian/rules (1)

15-21: Ubuntu branch incorrectly selects qt4 when project targets Qt6 — needs fix.

The evidence confirms the issue:

  • src/qt/CMakeLists.txt exclusively uses Qt6 (Qt6::Core, Qt6::Widgets, Qt6::Network, Qt6::DBus, etc.)
  • contrib/rpm/bitcoin.spec defaults to --with-gui=qt6 (qt4 is optional/legacy)
  • Documentation recommends Qt6
  • The Debian rules hardcoding qt4 for Ubuntu contradicts this

Fix by using QT=qt6 uniformly:

-QT=$(shell dpkg-vendor --derives-from Ubuntu && echo qt4 || echo qt6)
+QT=qt6
♻️ Duplicate comments (22)
depends/hosts/darwin.mk (1)

70-70: Remove duplicate -platform_version from darwin_LDFLAGS append.

This issue was flagged in a previous review and remains unaddressed. Line 65 sets darwin_LDFLAGS=-Wl,-platform_version,.... Line 70 appends the same flag again via +=, causing duplication that may trigger linker warnings.

Apply this diff:

-darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) -Wl,-no_adhoc_codesign -fuse-ld=lld
+darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-no_adhoc_codesign -fuse-ld=lld
depends/toolchain.cmake.in (1)

166-172: Inconsistent pattern matching and redundant wallet_packages assignment (previously flagged).

This issue was already identified in a previous review:

  1. Redundant assignment: Line 166 reassigns wallet_packages from @wallet_packages@, but this was already checked at line 160.
  2. Inconsistent pattern: Lines 168 uses STREQUAL "" instead of the MATCHES "^[ ]*$" pattern used elsewhere (lines 141, 148, 154, 160, 174), contradicting the comment on lines 138-140.

Apply this diff to fix both issues:

-set(wallet_packages @wallet_packages@)
 set(bdb_packages @bdb_packages@)
-if("${wallet_packages}" STREQUAL "" OR "${bdb_packages}" STREQUAL "")
+if("@wallet_packages@" MATCHES "^[ ]*$" OR "${bdb_packages}" MATCHES "^[ ]*$")
   set(WITH_BDB OFF CACHE BOOL "")
 else()
   set(WITH_BDB ON CACHE BOOL "")
 endif()
contrib/rpm/README.md (1)

75-78: Documentation references outdated Qt4 instead of Qt5.

The documentation mentions Qt4 as the legacy alternative, but since this PR migrates from Qt5 to Qt6, the legacy option should reference Qt5. The build flag should be updated to -D '_use_qt5 1' to accurately reflect the migration path.

depends/patches/native_qt/rcc_hardcode_timestamp.patch (1)

1-24: Critical: Patch removes reproducible build support.

This patch hardcodes the timestamp and removes support for SOURCE_DATE_EPOCH and QT_RCC_SOURCE_DATE_OVERRIDE environment variables, contradicting Qt's recommended approach for reproducible builds. The hardcoded value is inflexible for different build scenarios.

Consider using the environment variables instead of patching, or ensure builds set SOURCE_DATE_EPOCH externally.

src/qt/automintmodel.cpp (2)

53-67: Avoid 120s stall: re-arm timer or set lastUpdateTime only after locks.

On lock failure you requeue and return without resetting throttle; with lastUpdateTime set before TRY_LOCK, processing can be delayed up to 120s. Re-arm timer and clear throttle, or assign lastUpdateTime after acquiring both locks.

@@
-        if (txs.empty() || (lastUpdateTime != 0 && (now - lastUpdateTime <= 120))) {
+        if (txs.empty() || (lastUpdateTime != 0 && (now - lastUpdateTime <= 120))) {
             return;
         }
-
-        lastUpdateTime = now;
         batch.swap(txs);
     }
@@
-        TRY_LOCK(cs_main, lock_main);
+        TRY_LOCK(cs_main, lock_main);
         if (!lock_main) {
             // Put back batch if we couldn't proceed
             LOCK(cs);
             txs.insert(txs.end(), batch.begin(), batch.end());
+            lastUpdateTime = 0;
+            resetTimer();
             return;
         }
         TRY_LOCK(wallet->cs_wallet, lock_wallet);
         if (!lock_wallet) {
             LOCK(cs);
             txs.insert(txs.end(), batch.begin(), batch.end());
+            lastUpdateTime = 0;
+            resetTimer();
             return;
         }
+        // Only throttle after acquiring both core locks
+        lastUpdateTime = now;

Also applies to: 76-88


104-106: Use the correct wallet instance (multi-wallet correctness).

Replace pwalletMain with wallet to avoid miscomputing credit in multi‑wallet setups.

-        pwalletMain->AvailableCoinsForLMint(valueAndUTXOs, &coinControl);
+        wallet->AvailableCoinsForLMint(valueAndUTXOs, &coinControl);
depends/patches/qt/qtbase_skip_tools.patch (1)

10-21: Do not skip wrapper script generation (qt-cmake, qt-configure-module).

Removing qt_internal_create_wrapper_scripts() breaks downstream module config and related patches. Restore this call.

@@
-# Depends on the global features being evaluated.
-qt_internal_create_wrapper_scripts()
+# Depends on the global features being evaluated.
+qt_internal_create_wrapper_scripts()
depends/funcs.mk (3)

75-79: Honor per‑package patch path for hashing.

Hardcoding $(PATCHES_PATH)/$(1) breaks custom $(1)_patches_path and recipe hashes. Define a default and use it.

 define int_get_build_recipe_hash
-$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1))
+$(eval $(1)_patches_path?=$(PATCHES_PATH)/$(1))
+$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $($(1)_patches_path)/,$($(1)_patches)) | cut -d" " -f1))
 final_build_id_long+=:[$(1)_all_file_checksums]$(foreach checksum,$($(1)_all_file_checksums),$(shell echo ":$(checksum)")):
 $(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
 endef

82-92: _all_dependencies not initialized — dependency unpacking breaks.

$(1)_all_dependencies is used but never set; deps won’t be unpacked into host_prefix, breaking configure/build.

 $(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
-# $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($(1)_dependencies)))
-# $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
+$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
 $(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))

217-221: Fix PKG_CONFIG_SYSROOT_DIR hardcoded root in cross builds.

Line 219 in depends/funcs.mk has PKG_CONFIG_SYSROOT_DIR=/, which breaks pkg-config in cross-compilation by forcing resolution against the host root. Change to $($($(1)_type)_prefix) to match the pattern used by adjacent PKG_CONFIG_LIBDIR and PKG_CONFIG_PATH variables on lines 217-218. The verification confirms this is the only occurrence and no other hardcoded SYSROOT_DIR values exist elsewhere.

-$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=/
+$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=$($($(1)_type)_prefix)
depends/patches/native_qt/qtbase_avoid_native_float16.patch (1)

1-37: Verify patch necessity with Qt 6.7.3 (native builds).

Same concern as the target Qt patch: confirm whether this float16 workaround is still needed with Qt 6.7.3 for native builds, or if Qt's upstream improvements allow safe removal.

doc/build-unix.md (1)

266-269: FreeBSD parallelism: nproc portability issue persists.

The past review correctly identified that nproc is not available by default on FreeBSD. This should use sysctl -n hw.ncpu instead for portability.

Apply this fix:

-    cd depends && gmake -j$(nproc) && cd ..
+    cd depends && gmake -j$(sysctl -n hw.ncpu) && cd ..

And similarly for line 268:

-    cmake --build build -j$(nproc) -- -j$(nproc)
+    cmake --build build -j$(sysctl -n hw.ncpu)
README.md (2)

110-113: Update to Qt6 packages for Debian/Ubuntu.

The GUI dependencies still list Qt5 packages (qttools5-dev qttools5-dev-tools), but this PR migrates to Qt6. Update to Qt6 equivalents to match the actual build requirements.

Apply this fix:

-sudo apt-get install qttools5-dev qttools5-dev-tools libxcb-xkb-dev bison
+sudo apt-get install qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libxcb-xkb-dev bison

168-176: Remove stray build command and fix code block.

There's a stray make -j$(nproc) on line 175 and a broken code block structure. The closing ``` on line 176 should be on line 174, and lines 175-181 appear to be leftover content that should be removed.

Apply this fix:

 If the build succeeded, binaries will be generated in `build/bin/`: `firod`, `firo-cli`, and if GUI is enabled, `firo-qt`.
-make -j$(nproc)

-#### 3. Run GUI Client

- -./bin/firo-qt -


</blockquote></details>
<details>
<summary>depends/packages/native_qt.mk (2)</summary><blockquote>

`103-110`: **Undefined variable breaks fetch. Use `$($(package)_file_name)`.**

Line 104 references `$($(package)_download_file)` which is never defined in this file or qt_details.mk, causing fetch to fail.


Apply this fix:

```diff
-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \

155-158: Guard the translations move to prevent failure when directory is absent.

mv translations/ .. will error if translations/ doesn't exist after the build, aborting postprocess.

Apply this fix:

 define $(package)_postprocess_cmds
   rm -rf doc/ && \
-  mv translations/ ..
+  if [ -d translations ]; then mv translations ..; fi
 endef
src/qt/CMakeLists.txt (1)

57-74: Missing LinguistTools import will cause CMake target errors.

Lines 66, 405-406 use Qt6::lrelease, Qt6::lupdate, and Qt6::lconvert but these targets require find_package(Qt6 COMPONENTS LinguistTools REQUIRED).

Add near the top of this file (after line 4 or before first Qt6 tool usage):

find_package(Qt6 COMPONENTS LinguistTools REQUIRED)

If already declared in a parent CMakeLists.txt scope, verify it's present; otherwise CMake will error on unknown targets.

depends/packages/qt.mk (5)

101-103: Conflicting zlib options: both -system-zlib and -qt-zlib specified.

Line 101 sets -system-zlib and line 102 sets -qt-zlib. Qt's configure will only use one; having both creates ambiguity.

Remove the conflicting option (recommend keeping system zlib):

 $(package)_config_opts += -system-zlib
-$(package)_config_opts += -qt-zlib
 $(package)_config_opts += -static

55-56: C++ standard mismatch: configure uses c++17 but CMake enables cxx20 feature.

Line 55 sets -c++std c++17 while line 197 sets -DQT_FEATURE_cxx20=ON. This inconsistency may break Qt feature checks or cause undefined behavior.

Align both to C++20 (matches PR objective):

-$(package)_config_opts += -c++std c++17
+$(package)_config_opts += -c++std c++20

Keep -DQT_FEATURE_cxx20=ON as-is.

Also applies to: 196-199


138-141: Darwin config options defined twice, causing lost flags.

Lines 138-141 define $(package)_config_opts_darwin with = (assignment), then lines 163-169 redefine it with := (immediate assignment), overwriting earlier flags.

Consolidate into a single block:

-$(package)_config_opts_darwin = -no-dbus
-$(package)_config_opts_darwin += -no-opengl
-$(package)_config_opts_darwin += -no-feature-corewlan
-$(package)_config_opts += -no-feature-vulkan
+$(package)_config_opts_darwin = -no-dbus
+$(package)_config_opts_darwin += -no-opengl
+$(package)_config_opts_darwin += -pch
+$(package)_config_opts_darwin += -no-feature-printsupport
+$(package)_config_opts_darwin += -no-freetype
+$(package)_config_opts_darwin += -no-pkg-config
+$(package)_config_opts_darwin += -no-feature-corewlan
+$(package)_config_opts += -no-feature-vulkan

Remove lines 163-169 to avoid re-assignment.

Also applies to: 163-169


191-195: Darwin OBJC/OBJCXX environment vars defined but never used.

Lines 193-194 define $(package)_config_env_darwin with OBJC and OBJCXX but the configure (line 344) and build (line 348) commands only use $(package)_config_env, ignoring Darwin-specific compiler settings.

Apply Darwin env when building on Darwin:

 define $(package)_config_cmds
   cd qtbase && \
-  $($(package)_config_env) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
+  $($(package)_config_env) $($(package)_config_env_darwin) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
 endef

 define $(package)_build_cmds
-  $($(package)_config_env) cmake --build . -- $$(filter -j%,$$(MAKEFLAGS))
+  $($(package)_config_env) $($(package)_config_env_darwin) cmake --build . -- $$(filter -j%,$$(MAKEFLAGS))
 endef

Also applies to: 343-349


276-283: Undefined variable $($(package)_download_file) breaks fetch.

Line 277 uses $($(package)_download_file) which is never defined, causing fetch to fail.

Use the defined file name variable:

-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \
🧹 Nitpick comments (6)
src/qt/winshutdownmonitor.cpp (1)

7-7: Consider updating the Qt version check for clarity.

The condition QT_VERSION >= 0x050000 remains valid for Qt6, but could optionally be updated to QT_VERSION >= 0x060000 to explicitly reflect the Qt6 migration and clarify intent.

src/crypto/MerkleTreeProof/blake2/blake2.h (1)

1-11: Address naming inconsistency and add design documentation to blake2.h.

The macro-based namespace isolation is working correctly—all existing callers use original symbol names and are transparently renamed via these macros placed before the include guard. However, improve clarity:

  1. Standardize naming: Use prefix pattern (firo_blake2b_*) for all 11 symbols instead of mixing prefix and suffix patterns. Currently 7 symbols use firo_blake2b_* while 4 use *_firo (e.g., blake2bblake2b_firo, blake2b_longblake2b_long_firo).

  2. Add design documentation: Insert a comment block above the macros explaining the purpose: "Namespace isolation to prevent symbol collisions with system or other blake2b implementations. Original symbols are transparently renamed to firo_* variants for all downstream includes."

src/qt/CMakeLists.txt (1)

348-383: Consider the trade-offs of file(GLOB_RECURSE) for source discovery.

The refactor from get_directory_property() to file(GLOB_RECURSE) works but has implications:

  • CMake won't automatically re-configure when new source files are added (manual reconfigure required)
  • Explicit filtering needed for generated files (moc_, ui_, qrc_, build dir)

This is acceptable for the translation workflow, but be aware that adding new .cpp/.h files to src/, src/qt/, or src/util/ won't trigger automatic translation updates until CMake reconfigures.

If automatic discovery of new translatable sources is important, consider a configure-time script or document the need for manual reconfiguration in CONTRIBUTING.md.

src/leveldb/util/env_windows.cc (2)

709-709: Atomic shutdown flag is fine; consider explicit acquire/release (minor)

You write the flag without holding background_work_mutex_ and read it under that mutex. Using std::atomic makes this data-race free. For clarity and minimal fences, consider store(memory_order_release) in Shutdown() and load(memory_order_acquire) at the check site.

Example:

-std::atomic<bool> shutdown_requested_{false};
+std::atomic<bool> shutdown_requested_{false}; // release-store / acquire-load

// In Shutdown():
-shutdown_requested_ = true;
+shutdown_requested_.store(true, std::memory_order_release);

// In BackgroundThreadMain:
- if (shutdown_requested_) {
+ if (shutdown_requested_.load(std::memory_order_acquire)) {
     background_work_mutex_.Unlock();
     return;
   }

777-780: Confirm drain-vs-drop semantics during shutdown

Current behavior drains all queued work before exiting, and only exits when the queue becomes empty. If the intent is “graceful drain,” this is correct. If the intent is “immediate stop,” add a second check after popping (or drop the queue when shutdown is set). Also, with the guard suggested in Schedule(), new work won’t be accepted post-shutdown.

depends/patches/qt/qtbase_plugins_cocoa.patch (1)

1-7: Consider adding the full CMake issue URL for better documentation.

The patch references "CMake issue 23464" but doesn't include the full URL. Adding the complete URL (e.g., https://gitlab.kitware.com/cmake/cmake/-/issues/23464) would make it easier for future maintainers to look up the issue details and understand when this workaround can be removed.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f216944 and d03d1b9.

⛔ Files ignored due to path filters (1)
  • .github/workflows/ci-master.yml is excluded by !**/*.yml
📒 Files selected for processing (98)
  • CMakeLists.txt (1 hunks)
  • Dockerfile (3 hunks)
  • Makefile.am (0 hunks)
  • README.md (7 hunks)
  • autogen.sh (0 hunks)
  • build-aux/m4/ax_boost_base.m4 (0 hunks)
  • build-aux/m4/ax_boost_chrono.m4 (0 hunks)
  • build-aux/m4/ax_boost_filesystem.m4 (0 hunks)
  • build-aux/m4/ax_boost_program_options.m4 (0 hunks)
  • build-aux/m4/ax_boost_system.m4 (0 hunks)
  • build-aux/m4/ax_boost_thread.m4 (0 hunks)
  • build-aux/m4/ax_boost_unit_test_framework.m4 (0 hunks)
  • build-aux/m4/ax_check_compile_flag.m4 (0 hunks)
  • build-aux/m4/ax_check_link_flag.m4 (0 hunks)
  • build-aux/m4/ax_check_preproc_flag.m4 (0 hunks)
  • build-aux/m4/ax_cxx_compile_stdcxx.m4 (0 hunks)
  • build-aux/m4/ax_gcc_func_attribute.m4 (0 hunks)
  • build-aux/m4/ax_pthread.m4 (0 hunks)
  • build-aux/m4/ax_subdirs_configure.m4 (0 hunks)
  • build-aux/m4/bitcoin_find_bdb48.m4 (0 hunks)
  • build-aux/m4/bitcoin_qt.m4 (0 hunks)
  • build-aux/m4/bitcoin_subdir_to_include.m4 (0 hunks)
  • build-aux/m4/l_atomic.m4 (0 hunks)
  • cmake/module/FindQt.cmake (0 hunks)
  • configure.ac (0 hunks)
  • contrib/debian/changelog (1 hunks)
  • contrib/debian/rules (1 hunks)
  • contrib/guix/libexec/build.sh (1 hunks)
  • contrib/rpm/README.md (1 hunks)
  • contrib/rpm/bitcoin.spec (3 hunks)
  • depends/Makefile (3 hunks)
  • depends/config.site.in (1 hunks)
  • depends/funcs.mk (7 hunks)
  • depends/hosts/darwin.mk (1 hunks)
  • depends/packages/libxcb_util_cursor.mk (1 hunks)
  • depends/packages/native_qt.mk (1 hunks)
  • depends/packages/packages.mk (1 hunks)
  • depends/packages/qt.mk (2 hunks)
  • depends/packages/qt_details.mk (1 hunks)
  • depends/packages/zeromq.mk (1 hunks)
  • depends/patches/native_qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/native_qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/native_qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/native_qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/native_qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/patches/qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/qt/memory_resource.patch (0 hunks)
  • depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_qmain.patch (1 hunks)
  • depends/patches/qt/qtbase_platformsupport.patch (1 hunks)
  • depends/patches/qt/qtbase_plugins_cocoa.patch (1 hunks)
  • depends/patches/qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/toolchain.cmake.in (3 hunks)
  • doc/build-unix.md (5 hunks)
  • doc/man/Makefile.am (0 hunks)
  • libbitcoinconsensus.pc.in (0 hunks)
  • src/Makefile.am (0 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2.h (1 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2b.c (1 hunks)
  • src/init.cpp (2 hunks)
  • src/leveldb/include/leveldb/env.h (1 hunks)
  • src/leveldb/util/env.cc (1 hunks)
  • src/leveldb/util/env_posix.cc (3 hunks)
  • src/leveldb/util/env_windows.cc (3 hunks)
  • src/qt/CMakeLists.txt (8 hunks)
  • src/qt/automintmodel.cpp (2 hunks)
  • src/qt/bitcoin.cpp (4 hunks)
  • src/qt/bitcoinamountfield.cpp (1 hunks)
  • src/qt/bitcoingui.cpp (8 hunks)
  • src/qt/clientmodel.cpp (3 hunks)
  • src/qt/coincontroldialog.cpp (1 hunks)
  • src/qt/guiutil.cpp (5 hunks)
  • src/qt/notificator.cpp (3 hunks)
  • src/qt/recentrequeststablemodel.cpp (1 hunks)
  • src/qt/recentrequeststablemodel.h (1 hunks)
  • src/qt/rpcconsole.cpp (3 hunks)
  • src/qt/sendcoinsentry.cpp (2 hunks)
  • src/qt/splashscreen.cpp (1 hunks)
  • src/qt/test/CMakeLists.txt (1 hunks)
  • src/qt/transactionfilterproxy.cpp (1 hunks)
  • src/qt/transactiontablemodel.cpp (2 hunks)
  • src/qt/utilitydialog.cpp (2 hunks)
  • src/qt/winshutdownmonitor.cpp (1 hunks)
  • src/qt/winshutdownmonitor.h (1 hunks)
  • src/secp256k1/Makefile.am (0 hunks)
  • src/secp256k1/build-aux/m4/ax_jni_include_dir.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/bitcoin_secp.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/m4_ax_cxx_compile_stdcxx.m4 (0 hunks)
  • src/secp256k1/configure.ac (0 hunks)
  • src/univalue/Makefile.am (0 hunks)
  • src/univalue/autogen.sh (0 hunks)
  • src/univalue/build-aux/m4/.gitignore (0 hunks)
  • src/univalue/configure.ac (0 hunks)
💤 Files with no reviewable changes (36)
  • libbitcoinconsensus.pc.in
  • build-aux/m4/ax_check_preproc_flag.m4
  • src/univalue/autogen.sh
  • build-aux/m4/ax_boost_thread.m4
  • build-aux/m4/ax_boost_chrono.m4
  • doc/man/Makefile.am
  • build-aux/m4/bitcoin_qt.m4
  • build-aux/m4/ax_subdirs_configure.m4
  • src/secp256k1/build-aux/m4/bitcoin_secp.m4
  • autogen.sh
  • src/secp256k1/Makefile.am
  • src/secp256k1/configure.ac
  • build-aux/m4/ax_check_link_flag.m4
  • Makefile.am
  • src/secp256k1/build-aux/m4/m4_ax_cxx_compile_stdcxx.m4
  • configure.ac
  • build-aux/m4/ax_boost_filesystem.m4
  • build-aux/m4/bitcoin_subdir_to_include.m4
  • build-aux/m4/ax_cxx_compile_stdcxx.m4
  • build-aux/m4/ax_gcc_func_attribute.m4
  • cmake/module/FindQt.cmake
  • depends/patches/qt/memory_resource.patch
  • src/univalue/Makefile.am
  • build-aux/m4/ax_check_compile_flag.m4
  • build-aux/m4/ax_boost_system.m4
  • src/Makefile.am
  • src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4
  • build-aux/m4/ax_boost_base.m4
  • build-aux/m4/ax_pthread.m4
  • build-aux/m4/l_atomic.m4
  • src/univalue/configure.ac
  • build-aux/m4/bitcoin_find_bdb48.m4
  • src/univalue/build-aux/m4/.gitignore
  • build-aux/m4/ax_boost_program_options.m4
  • src/secp256k1/build-aux/m4/ax_jni_include_dir.m4
  • build-aux/m4/ax_boost_unit_test_framework.m4
🚧 Files skipped from review as they are similar to previous changes (29)
  • src/qt/winshutdownmonitor.h
  • depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch
  • src/qt/transactiontablemodel.cpp
  • src/init.cpp
  • src/qt/coincontroldialog.cpp
  • depends/patches/qt/dont_hardcode_pwd.patch
  • depends/patches/native_qt/dont_hardcode_pwd.patch
  • depends/patches/native_qt/qttools_skip_dependencies.patch
  • src/qt/recentrequeststablemodel.cpp
  • src/leveldb/util/env_posix.cc
  • depends/patches/native_qt/qtbase_skip_tools.patch
  • depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch
  • src/qt/bitcoinamountfield.cpp
  • depends/patches/qt/qttools_skip_dependencies.patch
  • contrib/rpm/bitcoin.spec
  • src/leveldb/util/env.cc
  • depends/packages/libxcb_util_cursor.mk
  • src/qt/bitcoin.cpp
  • src/qt/transactionfilterproxy.cpp
  • CMakeLists.txt
  • src/qt/rpcconsole.cpp
  • src/leveldb/include/leveldb/env.h
  • depends/config.site.in
  • src/qt/sendcoinsentry.cpp
  • depends/packages/qt_details.mk
  • src/qt/guiutil.cpp
  • src/qt/recentrequeststablemodel.h
  • src/qt/test/CMakeLists.txt
  • depends/patches/qt/qtbase_avoid_qmain.patch
🧰 Additional context used
🧬 Code graph analysis (3)
src/crypto/MerkleTreeProof/blake2/blake2.h (1)
src/crypto/MerkleTreeProof/blake2/blake2b.c (9)
  • blake2b_init (102-128)
  • blake2b_init_key (130-175)
  • blake2b_init_param (84-99)
  • blake2b_update (290-328)
  • blake2b_final (371-399)
  • blake2b (432-468)
  • blake2b_long (471-527)
  • blake2b_4r_update (330-368)
  • blake2b_4r_final (401-429)
src/leveldb/util/env_windows.cc (1)
src/leveldb/util/env_posix.cc (1)
  • shutdown_requested_ (732-735)
src/qt/clientmodel.cpp (1)
src/chainparams.cpp (4)
  • Params (1348-1351)
  • Params (1348-1348)
  • Params (1353-1365)
  • Params (1353-1353)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: build-guix-arm64-apple-darwin
  • GitHub Check: build-guix-aarch64-linux-gnu
  • GitHub Check: build-mac-cmake
  • GitHub Check: build-guix-x86_64-w64-mingw32
  • GitHub Check: build-guix-x86_64-apple-darwin
  • GitHub Check: build-guix-x86_64-linux-gnu
  • GitHub Check: build-windows-cmake
  • GitHub Check: build-linux-cmake
  • GitHub Check: build
🔇 Additional comments (35)
src/qt/winshutdownmonitor.cpp (1)

19-19: Correct Qt6 API migration.

The signature change from long* to qintptr* is required for Qt6 compatibility. Qt6 changed the QAbstractNativeEventFilter::nativeEventFilter signature to use qintptr* for better cross-platform portability. The function body remains compatible since qintptr correctly holds the integer values assigned.

src/qt/clientmodel.cpp (1)

167-167: LGTM! Qt6 time API migration is correct.

The replacement of QDateTime::fromTime_t() with QDateTime::fromSecsSinceEpoch() is the standard Qt5→Qt6 migration path for Unix timestamp conversion. The changes are consistent across all four call sites and properly handle blockchain timestamps, genesis block time, and client startup time.

Also applies to: 171-171, 289-289, 375-375

src/crypto/MerkleTreeProof/blake2/blake2b.c (1)

1-11: Symbol renaming macros mirror the header file.

These macros are identical to those in blake2.h and correctly ensure that both the function declarations and definitions are consistently renamed. Since blake2.h is included at line 33, the renaming is applied uniformly.

The same observations from blake2.h apply here:

  • Naming inconsistency between prefix (firo_blake2b_*) and suffix (*_firo) patterns.
  • Consider adding a documentation comment explaining the namespace isolation rationale.
depends/patches/qt/rcc_hardcode_timestamp.patch (2)

9-24: LGTM! Hardcoding timestamp ensures reproducible builds.

The approach of hardcoding the timestamp to 1 is standard practice for deterministic/reproducible builds and aligns with the stated goal of enabling Qt package reuse across different build environments (e.g., Guix). This removes all sources of timestamp variability—file modification times and environment variables like SOURCE_DATE_EPOCH.


9-24: Upgrade to Qt 6.8.x LTS recommended for long-term stability.

Qt 6.7.3 is the final release in the 6.7 branch with standard support ending in March 2025, making it maintenance-only. Qt 6.8 LTS was released Oct 8, 2024 and provides 5 years of support (until Oct 8, 2029). Qt 6.8 includes many improvements, completed modules (e.g., Qt Graphs, Qt HttpServer, Qt gRPC), and broader platform support. Verify that the rcc_hardcode_timestamp.patch remains compatible with Qt 6.8 before proceeding.

depends/toolchain.cmake.in (3)

17-19: LGTM! Compiler target variables properly configured for cross-compilation.

Setting CMAKE_C_COMPILER_TARGET, CMAKE_CXX_COMPILER_TARGET, and CMAKE_OBJCXX_COMPILER_TARGET to the host triplet is the correct approach for Clang/LLVM-based cross-compilation toolchains.


110-113: LGTM! Guard prevents duplicate CMAKE_PREFIX_PATH entries.

The check ensures "/" is appended only once when the toolchain file is processed multiple times, which is appropriate for the depends system.


145-145: LGTM! Qt6_ROOT properly configured for Qt6 migration.

Setting Qt6_ROOT to point to the depends directory ensures CMake can locate the Qt6 installation when GUI build is enabled.

contrib/debian/changelog (1)

48-48: LGTM! Changelog correctly reflects Qt6 migration.

The changelog entry has been properly updated to document the Qt6 migration.

src/qt/utilitydialog.cpp (2)

27-27: LGTM! Correct Qt6 API migration.

The include change from QRegExp to QRegularExpression is required for Qt6 compatibility, as QRegExp was removed in Qt6.


57-59: LGTM! Non-greedy regex pattern correctly replaces QRegExp.

The migration to QRegularExpression with the non-greedy pattern "<(.*?)>" correctly preserves the original minimal-matching behavior. The replacement logic remains functionally equivalent.

contrib/guix/libexec/build.sh (2)

368-378: LGTM! Darwin wildcard pattern enables multi-arch support.

Changing from "x86_64-apple-darwin" to "*darwin*" correctly enables the environment clearing for all Darwin architectures (including ARM-based macOS). The additional unsetting of CC, CXX, and CPP aligns with the comment about preventing GCC header conflicts.


383-383: I need to gather more context about how similar environment variables are handled in the script and verify if this pattern is standard.

Now let me check if there are similar PATH handling patterns elsewhere in the script to understand the codebase's conventions:

Based on my verification, I can now provide a rewritten review comment.

Use conditional separator for PKG_CONFIG_PATH prepending to avoid trailing colon when empty.

The syntax PKG_CONFIG_PATH="${BASEPREFIX}/${HOST}/lib/pkgconfig:$PKG_CONFIG_PATH" prepends the path correctly, but creates a trailing colon when PKG_CONFIG_PATH is empty. A trailing colon counts as adding the current directory to the environment path variable, which is a security concern. While the impact is lower for pkg-config than for PATH or LD_LIBRARY_PATH in a build environment, consider using the conditional separator pattern: PKG_CONFIG_PATH="${BASEPREFIX}/${HOST}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" to avoid empty path entries.

src/qt/bitcoingui.cpp (4)

45-45: LGTM! Required include for QActionGroup usage.

The QActionGroup include is necessary as the class is instantiated at line 308.


389-389: LGTM! Correct modifier combination operator for Qt6.

The change from + to | for combining Qt key modifiers (e.g., Qt::CTRL | Qt::Key_Q) is the correct Qt6 approach. The + operator for combining flags is deprecated in Qt6, and | is the proper bitwise OR operator for flag combinations.

Also applies to: 462-463


554-554: LGTM! Correct Qt6 QDateTime API migration.

Replacing fromTime_t with fromSecsSinceEpoch is necessary as fromTime_t was deprecated in Qt5.8 and removed in Qt6. The replacement is functionally equivalent and correctly uses the Qt6 API.


314-314: String-based shortcuts are the correct Qt 6 approach—no changes needed.

Qt 6's QKeySequence accepts human-readable string formats with modifiers like "Alt" that work cross-platform, with automatic platform mapping (e.g., "Alt" translates to the appropriate modifier per OS). The changes from Qt::ALT + key to QString("Alt+%1").arg(key++) modernize the code to the recommended pattern and ensure consistent cross-platform behavior. The sequential key assignment correctly produces the intended shortcuts (Alt+1, Alt+2, etc.).

depends/patches/qt/qtbase_platformsupport.patch (1)

19-33: Condition refinement LGTM.

Prevents creating InputSupportPrivate without sources under certain feature combos.

Please confirm this matches the Qt minor versions you target in CI (e.g., 6.7.x vs 6.10).

depends/packages/packages.mk (1)

6-12: LGTM! Qt6 packaging updates are well-structured.

The additions support Qt6 properly: libxcb_util_cursor is required for Qt6 cursor functionality, FreeBSD now mirrors Linux packages, and the cross-compilation conditional correctly handles native Qt builds.

Dockerfile (2)

29-32: LGTM! CMake migration is properly implemented.

The build workflow correctly uses CMake idioms with toolchain files, parallel builds, testing, and installation. The structure follows CMake best practices.


6-19: autoconf and m4 are actively needed for the depends build system—consider adding a clarifying comment.

The verification confirms that these packages are required. The Dockerfile runs make in the depends directory (line 26), which invokes the depends build system. From the build scripts, 22+ dependency packages still rely on Autotools—they use ./configure scripts that require both autoconf and m4 to process and execute properly.

Specifically, m4 is needed by autoconf itself at runtime when processing m4 macros in configure scripts. The affected packages include zeromq, sqlite, tor, libevent, libxcb variants, and others.

Your suggestion to add a comment explaining why these packages are retained (rather than removing them) is valid and would help future maintainers understand the dependency chain. For example:

# autoconf, m4, and libtool are required by the depends build system
# for packages that still use Autotools/configure scripts
depends/Makefile (3)

50-50: Verify C++20 requirement is intentional.

The C++ standard has been upgraded from C++17 to C++20. While Qt6 requires C++17 minimum, this upgrade to C++20 will require more modern compiler versions across all platforms. Confirm this is intentional and that all supported build environments (Ubuntu 18.04+, FreeBSD, etc.) have adequate C++20 compiler support.

Based on learnings


172-172: LGTM! Native Qt packages properly integrated.

The addition of $(qt_native_packages_) correctly integrates the conditional native Qt package handling from packages.mk for cross-compilation scenarios.


275-275: LGTM! Install target aligned with CMake migration.

Removal of config.site dependency correctly reflects the migration from Autotools to CMake-based builds.

doc/build-unix.md (2)

30-34: LGTM! CMake build commands are correct.

The documented build workflow properly uses CMake with toolchain files and parallel builds following best practices.


87-95: LGTM! Fedora dependencies updated for Qt6 and CMake.

Package list correctly reflects Qt6 (qt6-qttools-devel, qt6-qtbase-devel) and CMake-based builds with appropriate removal of autotools packages.

src/qt/notificator.cpp (4)

30-55: LGTM! FreedesktopImage class properly structured.

The class declaration is well-organized with appropriate static methods for DBus type registration and conversion, plus proper friend operators for DBus marshalling.


82-84: LGTM! Explicit DBus type registration ensures proper initialization.

Calling FreedesktopImage::metaType() during interface initialization ensures the custom DBus type is registered before use, which is essential for proper DBus marshalling.


157-157: LGTM! Qt6-compatible variant conversion.

Using QVariant::fromValue() is the correct Qt6 approach for converting custom types to QVariant.


149-152: Incorrect review comment - original premise about Qt6 API is wrong.

In Qt 6, qDBusRegisterMetaType<T>() returns a QMetaType object, which is copyable. The QMetaType class has an .id() method in Qt 6, so calling .id() on the return value is valid. The code at lines 149-152 is correct as-is.

Likely an incorrect or invalid review comment.

README.md (2)

155-164: LGTM! CMake build instructions are clear and correct.

The documented headless and GUI build workflows properly use CMake with appropriate flags and parallel builds.


200-222: LGTM! Cross-compilation documentation is comprehensive.

The cross-compilation section clearly documents supported targets and provides a complete example workflow.

depends/patches/qt/qtbase_avoid_native_float16.patch (1)

1-37: Let me search for the minimum GCC version requirement and check Qt 6.7.3's float16 handling.

Let me check the minimum GCC version requirement in Bitcoin Core:

Patch is necessary with Qt 6.7.3 and Bitcoin Core's minimum compiler version.

Bitcoin Core requires GCC 11.1 as minimum, but the patch states it can only be dropped when the minimum libgcc version is updated to 12.x or newer. Since the current requirement remains GCC 11.1, the patch must stay in place to avoid native float16 compatibility issues on Linux.

depends/packages/qt.mk (1)

96-98: Cross-compilation host path handling verified as correct.

build_prefix is correctly defined in depends/Makefile:110 as $(host_prefix)/native, pointing to the native Qt installation. Both the configure script (line 97: -qt-host-path $(build_prefix)) and CMake (line 252: -DQT_HOST_PATH=$(build_prefix)) use the same variable consistently and are properly scoped within ifneq ($(host),$(build)) blocks for cross-compilation only. The setup is coherent and the depends build system correctly propagates build_prefix to the native tools PATH.

depends/patches/qt/qtbase_plugins_cocoa.patch (1)

16-21: CMake workaround is correct and still necessary for Qt 6.7.3.

CMake issue #23464 remains an open bug affecting Qt PCH builds, and the patch correctly implements the documented workaround. The implementation is sound with proper conditional guards and clear documentation. This appears to be a Bitcoin Core-specific patch addressing a known CMake/Qt interaction that upstream Qt 6.7.3 has not yet fixed.

Verify only that the patch applies cleanly to the Qt 6.7.3 source tree during testing.

ifdef GUIX_ENVIRONMENT
$(package)_config_env_x86_64_darwin = LIB_LIBRARY_BACKUP=$LIBRARY_PATH
$(package)_config_env_x86_64_darwin = LIBRARY_PATH=""
$(package)_config_env_x86_64_darwin = LIB_LIBRARY_BACKUP="$(LIBRARY_PATH)" LIBRARY_PATH=""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify makefile variable syntax change.

The change from $LIBRARY_PATH to "$(LIBRARY_PATH)" adds quotes (good for paths with spaces) but also changes the syntax from shell variable expansion to make variable expansion. Verify this is correct for the config_env context—it should likely remain as "${LIBRARY_PATH}" (shell syntax with quotes) rather than "$(LIBRARY_PATH)" (make syntax).


🏁 Script executed:

#!/bin/bash
# Check how other config_env variables are defined in depends/packages
rg -n "config_env.*=" depends/packages/*.mk | head -20

Length of output: 1287


I need to gather more context about how config_env variables are processed and whether LIBRARY_PATH is a Make variable.

Now let me search the codebase for LIBRARY_PATH and how it's handled:

Let me search the repository directly to verify how config_env is used and if LIBRARY_PATH is defined as a Make variable:


Once I receive the script results, I'll have definitive evidence about whether LIBRARY_PATH is a Make variable and how config_env is actually used.

---

🏁 Script executed:

```shell
#!/bin/bash
# Search for LIBRARY_PATH definitions in the build system
echo "=== Searching for LIBRARY_PATH definitions ==="
rg -n "LIBRARY_PATH\s*=" depends/ | head -20

echo ""
echo "=== Searching for config_env usage/invocation ==="
rg -n "config_env" depends/build-generic.mk | head -30

echo ""
echo "=== Looking for LIB_LIBRARY_BACKUP usage ==="
rg -n "LIB_LIBRARY_BACKUP" depends/

Length of output: 935


Let me search for where config_env variables are used in the build system:


---

🏁 Script executed:

```shell
#!/bin/bash
# Find where config_env is used/invoked
echo "=== Searching for config_env usage ==="
rg -n "config_env" depends/*.mk | head -20

echo ""
echo "=== Searching for how config_env_x86_64_darwin is referenced ==="
rg -n "config_env_x86_64_darwin" depends/

echo ""
echo "=== Looking for main Makefile or build rules ==="
fd -name "Makefile" or -name "*.mk" | head -10

Length of output: 1282


Let me check the git history to see what the original code was:


---

🏁 Script executed:

```shell
#!/bin/bash
# Check git history for zeromq.mk to see what changed
echo "=== Current zeromq.mk line 17 ==="
sed -n '17p' depends/packages/zeromq.mk

echo ""
echo "=== Git log for this file (if available) ==="
cd depends/packages && git log --oneline zeromq.mk 2>/dev/null | head -5

echo ""
echo "=== Git diff/blame for line 17 (if available) ==="
cd depends/packages && git blame zeromq.mk 2>/dev/null | sed -n '17p'

Length of output: 555


Let me check the recent commits to see what changed:


---

🏁 Script executed:

```shell
#!/bin/bash
# Check git diffs for recent commits that touched zeromq.mk
echo "=== Git show for 'Modernize GUIX' commit ==="
git show 5ee5815a5:depends/packages/zeromq.mk 2>/dev/null | sed -n '15,20p'

echo ""
echo "=== Git show for 'update depends' commit ==="
git show 26daa0268:depends/packages/zeromq.mk 2>/dev/null | sed -n '15,20p'

echo ""
echo "=== Git diff between commits (if changed) ==="
git diff 26daa0268 5ee5815a5 -- depends/packages/zeromq.mk 2>/dev/null | head -30

Length of output: 1072


Correct the makefile variable syntax to properly reference shell environment variable.

The change from $LIBRARY_PATH to "$(LIBRARY_PATH)" introduced a bug. The original syntax correctly referenced the shell environment variable; the current syntax attempts Make variable expansion, which fails since LIBRARY_PATH is not a Make variable. This causes LIB_LIBRARY_BACKUP to always be set to an empty string instead of capturing the environment value.

The line should use "$${LIBRARY_PATH}" (or "$$LIBRARY_PATH") to properly escape for shell evaluation, consistent with patterns in native_qt.mk (CC="$$(build_CC)") and other build files. The ifdef GUIX_ENVIRONMENT guard should also be restored.

🤖 Prompt for AI Agents
In depends/packages/zeromq.mk around line 17, the makefile incorrectly uses Make
expansion "$(LIBRARY_PATH)" which fails to capture the shell LIBRARY_PATH;
change the assignment to export the shell variable by using an escaped dollar so
the shell sees $LIBRARY_PATH (e.g., use "$${LIBRARY_PATH}" or "$$LIBRARY_PATH"),
and restore the surrounding conditional guard (ifdef GUIX_ENVIRONMENT) that was
removed so this override only applies in the GUIX environment.

set(ENV{PKG_CONFIG_PATH} ${pkg_config_path})
set(ENV{PKG_CONFIG_LIBDIR} ${pkg_config_path})
unset(pkg_config_path)
set(PKG_CONFIG_ARGN --static)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify that PKG_CONFIG_ARGN is recognized by the build system.

PKG_CONFIG_ARGN is not a standard pkg-config environment variable. Standard pkg-config only recognizes variables like PKG_CONFIG_PATH, PKG_CONFIG_LIBDIR, etc. To pass --static to pkg-config, it's typically done via command-line arguments rather than environment variables.

Verify whether PKG_CONFIG_ARGN is custom handling specific to this build system:


🏁 Script executed:

#!/bin/bash
# Search for uses of PKG_CONFIG_ARGN in the codebase
rg -n "PKG_CONFIG_ARGN" --type=cmake --type=make -C 3

Length of output: 0



---

🏁 Script executed:

```shell
#!/bin/bash
# Search for PKG_CONFIG_ARGN without file type restrictions
rg -n "PKG_CONFIG_ARGN" -C 3

Length of output: 379



---

🏁 Script executed:

```shell
#!/bin/bash
# Search for pkg_check_modules, pkg_config_get_target_properties, or invoke patterns
rg -n "pkg_check_modules|pkg_config_get|pkg_get_module|find_package.*PkgConfig" -C 3

Length of output: 2908



---

🏁 Script executed:

```shell
#!/bin/bash
# Search for any custom pkg-config wrapper or scripts that invoke pkg-config
rg -n "pkg-config|pkg_config" -g "*.sh" -g "*.py" -C 2

Length of output: 275



---

🏁 Script executed:

```shell
#!/bin/bash
# Examine the toolchain.cmake.in file around line 133 for context
sed -n '120,145p' depends/toolchain.cmake.in

Length of output: 974


Remove dead code: PKG_CONFIG_ARGN is never used by CMake or pkg-config.

Line 133 sets PKG_CONFIG_ARGN --static, but this variable is not referenced anywhere in the codebase. CMake's pkg_check_modules() command does not automatically consume a PKG_CONFIG_ARGN environment variable—it only respects standard pkg-config variables like PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR.

To actually pass --static to pkg-config for static linking, the flag must be passed directly in the pkg_check_modules() calls themselves (e.g., pkg_check_modules(... STATIC ...) or as a direct argument), not via an unused environment variable.

Remove line 133 or implement the proper mechanism to pass --static through pkg_check_modules() invocations.

🤖 Prompt for AI Agents
In depends/toolchain.cmake.in around line 133, remove the dead assignment
setting PKG_CONFIG_ARGN (--static) because CMake/pkg_check_modules does not use
this variable; either delete that line entirely or, if static pkg-config queries
are required, update the specific pkg_check_modules() invocations to pass STATIC
or the --static flag directly (e.g., add STATIC to the pkg_check_modules() call
or supply --static as an explicit argument to those calls) so the --static
option is actually applied where needed.

Comment on lines +680 to +684
void Shutdown() override {
shutdown_requested_ = true;
background_work_cv_.SignalAll();
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Guard against enqueuing work after Shutdown; otherwise jobs can pile up with no worker

After Shutdown(), the background thread exits but started_background_thread_ stays true. Any subsequent Schedule() will enqueue items and signal, but no thread will consume them (Schedule() won’t start a new thread). Add a shutdown guard in Schedule() to reject new work once shutdown is requested.

Apply this diff inside WindowsEnv::Schedule():

 void WindowsEnv::Schedule(
     void (*background_work_function)(void* background_work_arg),
     void* background_work_arg) {
-  background_work_mutex_.Lock();
+  background_work_mutex_.Lock();
+
+  // Do not accept new work after shutdown has been requested.
+  if (shutdown_requested_.load(std::memory_order_acquire)) {
+    background_work_mutex_.Unlock();
+    return;
+  }

   // Start the background thread, if we haven't done so already.
   if (!started_background_thread_) {
     started_background_thread_ = true;
     std::thread background_thread(WindowsEnv::BackgroundThreadEntryPoint, this);
     background_thread.detach();
   }

Optional micro: in Shutdown(), use release semantics to pair with the acquire above:

-  shutdown_requested_ = true;
+  shutdown_requested_.store(true, std::memory_order_release);

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/leveldb/util/env_windows.cc around lines 680 to 684, Schedule() must be
changed to refuse/ignore new work after Shutdown() has been called because
Shutdown() sets shutdown_requested_ and the background thread exits while
started_background_thread_ remains true; modify Schedule() to check
shutdown_requested_ (using the same atomic acquire semantics already used) and
return immediately (or fail to enqueue) when shutdown is requested so no tasks
are added with no worker to process them, and update Shutdown() to set
shutdown_requested_ using release semantics to pair with the acquire in
Schedule().

#include <QApplication>
#include <QCloseEvent>
#include <QDesktopWidget>
#include <QScreen>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify QScreen include is necessary.

The include was changed from QDesktopWidget to QScreen for Qt6 compatibility (QDesktopWidget was removed in Qt6). However, the active code doesn't appear to use QScreen—the section that would use it (lines 79-183) is commented out.

Verify whether this include is needed or if it can be removed until the commented code is activated.


🏁 Script executed:

#!/bin/bash
# Check if QScreen is used in the active (non-commented) code
rg -n "QScreen" src/qt/splashscreen.cpp | grep -v "^[[:space:]]*#include" | grep -v "^[[:space:]]*//"

Length of output: 21


Remove unnecessary #include <QScreen> from line 24.

The verification confirms QScreen is not used in the active code—the include appears only on line 24 with no references elsewhere outside the commented section (lines 79-183). Remove the include; it can be re-added when the commented code is activated.

🤖 Prompt for AI Agents
In src/qt/splashscreen.cpp around line 24, remove the unnecessary #include
<QScreen> which is unused in the active code (only referenced in commented
sections); delete that include line so only required headers remain and re-add
it later if the commented code is restored.

@aleflm aleflm force-pushed the dev-aleflm-update-qt6-rebased branch 3 times, most recently from 854b427 to 27a1516 Compare October 21, 2025 13:05
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (7)
depends/toolchain.cmake.in (2)

124-134: Remove dead PKG_CONFIG_ARGN; pass STATIC to pkg_check_modules instead.

CMake/pkg-config ignore PKG_CONFIG_ARGN; this line has no effect. Use STATIC in the calling pkg_check_modules() instead.

   set(ENV{PKG_CONFIG_LIBDIR} ${pkg_config_path})
   unset(pkg_config_path)
-  set(PKG_CONFIG_ARGN --static)
+  # Removed: PKG_CONFIG_ARGN is not consumed by CMake/pkg-config.
 endif()

166-172: Fix BDB gating: remove redundant variable and use MATCHES for blank detection.

Avoid reassigning wallet_packages and align blank checks with MATCHES to handle whitespace-only values.

-set(wallet_packages @wallet_packages@)
 set(bdb_packages @bdb_packages@)
-if("${wallet_packages}" STREQUAL "" OR "${bdb_packages}" STREQUAL "")
+if("@wallet_packages@" MATCHES "^[ ]*$" OR "${bdb_packages}" MATCHES "^[ ]*$")
   set(WITH_BDB OFF CACHE BOOL "")
 else()
   set(WITH_BDB ON CACHE BOOL "")
 endif()
depends/packages/qt.mk (5)

55-55: Align C++ standard: configure uses c++17 but CMake enables C++20.

Make both C++20 to avoid feature/ABI mismatches.

-$(package)_config_opts += -c++std c++17
+$(package)_config_opts += -c++std c++20

Also applies to: 196-199


101-103: Conflicting zlib options (-system-zlib vs -qt-zlib). Pick one (recommend system).

Both set leads to undefined configure behavior. Keep -system-zlib, drop -qt-zlib.

 $(package)_config_opts += -system-zlib
-$(package)_config_opts += -qt-zlib

138-141: Darwin options are redefined later, overwriting earlier flags. Consolidate.

Second block uses := and clobbers the first. Merge into a single Darwin block.

-$(package)_config_opts_darwin = -no-dbus
-$(package)_config_opts_darwin += -no-opengl
-$(package)_config_opts_darwin += -no-feature-corewlan
-$(package)_config_opts += -no-feature-vulkan
+$(package)_config_opts_darwin = -no-dbus
+$(package)_config_opts_darwin += -no-opengl
+$(package)_config_opts_darwin += -no-feature-corewlan
+$(package)_config_opts += -no-feature-vulkan
@@
-$(package)_config_opts_darwin := -no-dbus
-$(package)_config_opts_darwin += -no-opengl
-$(package)_config_opts_darwin += -pch
-$(package)_config_opts_darwin += -no-feature-printsupport
-$(package)_config_opts_darwin += -no-freetype
-$(package)_config_opts_darwin += -no-pkg-config
+# merged above:
+# += -pch
+# += -no-feature-printsupport
+# += -no-freetype
+# += -no-pkg-config

Apply the “+=” lines to the first block and delete the second block.

Also applies to: 163-169


276-283: fetch_file uses undefined $(package)_download_file; replace with _file_name.

Prevents fetch failure.

-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \

343-349: Darwin compilers env defined but not used in configure/build.

Include $(package)_config_env_darwin so Apple toolchains/flags apply.

 define $(package)_config_cmds
   cd qtbase && \
-  $($(package)_config_env) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
+  $($(package)_config_env) $($(package)_config_env_darwin) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
 endef

 define $(package)_build_cmds
-  $($(package)_config_env) cmake --build . --parallel
+  $($(package)_config_env) $($(package)_config_env_darwin) cmake --build . --parallel
 endef
🧹 Nitpick comments (3)
depends/toolchain.cmake.in (1)

110-113: Prefix-path “/” guard: confirm scope.

Appending “/” to CMAKE_PREFIX_PATH can broaden searches on native builds. Consider guarding this under cross builds only, or confirm it’s required for your find_* strategy.

depends/packages/qt.mk (2)

170-181: Deduplicate Linux flags.

-dbus-runtime and -fontconfig are added twice. Keep one of each.

 $(package)_config_opts_linux := -dbus-runtime
 $(package)_config_opts_linux += -fontconfig
@@
-$(package)_config_opts_linux += -fontconfig
@@
-$(package)_config_opts_linux += -dbus-runtime

52-52: Minor: remove repeated flags (-no-egl, -no-zstd).

These are set twice globally; trim duplicates to keep option lists tidy.

-$(package)_config_opts = -no-egl
+$(package)_config_opts =
@@
-$(package)_config_opts += -no-egl
@@
-$(package)_config_opts += -no-zstd

(Keep a single -no-egl and -no-zstd in the list.)

Also applies to: 58-58, 88-89

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d03d1b9 and 27a1516.

⛔ Files ignored due to path filters (1)
  • .github/workflows/ci-master.yml is excluded by !**/*.yml
📒 Files selected for processing (2)
  • depends/packages/qt.mk (2 hunks)
  • depends/toolchain.cmake.in (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: build-guix-x86_64-linux-gnu
  • GitHub Check: build-guix-x86_64-w64-mingw32
  • GitHub Check: build-guix-aarch64-linux-gnu
  • GitHub Check: build-mac-cmake
  • GitHub Check: build-windows-cmake
  • GitHub Check: build-guix-arm64-apple-darwin
  • GitHub Check: build-linux-cmake
  • GitHub Check: build-guix-x86_64-apple-darwin
  • GitHub Check: build

@aleflm aleflm force-pushed the dev-aleflm-update-qt6-rebased branch from 27a1516 to 1f09751 Compare October 23, 2025 17:34
@aleflm
Copy link
Contributor Author

aleflm commented Oct 23, 2025

Rebased to master to solve the conflicts.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
depends/patches/qt/rcc_hardcode_timestamp.patch (1)

1-4: ---

Remove hardcoded timestamp and preserve SOURCE_DATE_EPOCH support instead.

The patch removes standard reproducible build mechanisms that Qt and Guix both recommend. The commit message claims to support "SOURCE_DATE_EPOCH variable set, e.g., for Guix builds," but the implementation removes exactly these mechanisms:

  1. Qt (including Qt6) doesn't recommend "hardcoding RCC timestamps to 1"; recommended approaches are to use SOURCE_DATE_EPOCH or QT_RCC_SOURCE_DATE_OVERRIDE
  2. Guix makes Qt rcc deterministic by setting SOURCE_DATE_EPOCH for builds, with modern Qt respecting QT_RCC_SOURCE_DATE_OVERRIDE and SOURCE_DATE_EPOCH so rcc embeds a stable timestamp

The patch contradicts its stated goal: it removes the SOURCE_DATE_EPOCH/QT_RCC_SOURCE_DATE_OVERRIDE logic that enables reproducible builds in Guix. Instead of hardcoding to 1, preserve the original logic that respects these environment variables.

src/qt/coincontroldialog.cpp (1)

680-702: Tri‑state checkbox semantics: include both Tristate and UserTristate

Using only ItemIsUserTristate can break automatic partial state on parents. Keep ItemIsTristate and add ItemIsUserTristate if you want user cycling.

Apply:

-    QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsUserTristate;
+    QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable
+        | Qt::ItemIsTristate | Qt::ItemIsUserTristate;
contrib/rpm/bitcoin.spec (1)

16-24: Update the RPM spec file to reference Firo instead of Bitcoin Core.

The bitcoin.spec file retains old Bitcoin Core metadata (Name: bitcoin, Version: 0.12.0, URLs pointing to bitcoin.org and bitcoin/bitcoin GitHub). However, other build configurations in the repository have been updated for Firo:

  • contrib/flathub/org.firo.firo-qt.metainfo.xml
  • contrib/macdeploy/create-dmg.sh (references "Firo-Qt", "Firo-Core")
  • contrib/verifybinaries/verify.sh (references "firo-core-")

This spec file should be updated to match the Firo project name, version, and sources for consistency with the repository and other build outputs.

src/qt/automintmodel.cpp (1)

65-81: Fix critical brace mismatch and duplicate variable declaration.

The if (!lock_main) { block at line 60 is missing its closing brace after line 64's return statement. This causes all subsequent lock acquisition and processing code (lines 65+) to be syntactically nested inside the failed-lock condition, inverting the intended control flow.

Additionally:

  • Lines 76-77 redeclare CCoinControl coinControl (already created at lines 55-56), shadowing the outer variable
  • Lines 79-80: the while loop pops tx from txs but never uses it (dead code)

Add the missing } after line 64's return statement to properly close the if block, remove the duplicate CCoinControl declaration, and either remove the while loop or implement its intended logic.

♻️ Duplicate comments (30)
depends/packages/zeromq.mk (1)

17-17: Critical: Incorrect variable expansion breaks LIBRARY_PATH backup on Darwin.

The syntax "$(LIBRARY_PATH)" uses Make variable expansion, but LIBRARY_PATH is a shell environment variable, not a Make variable. This causes Make to expand it to an empty string, resulting in:

LIB_LIBRARY_BACKUP="" LIBRARY_PATH=""

This breaks the intended backup mechanism for the GUIX Darwin build.

Apply this diff to fix the shell variable expansion:

-$(package)_config_env_x86_64_darwin = LIB_LIBRARY_BACKUP="$(LIBRARY_PATH)" LIBRARY_PATH=""
+$(package)_config_env_x86_64_darwin = LIB_LIBRARY_BACKUP="$$LIBRARY_PATH" LIBRARY_PATH=""

The double dollar sign ($$) escapes to a single $ in the shell, allowing proper expansion of the LIBRARY_PATH environment variable.

src/qt/notificator.cpp (1)

149-152: Compile error: qDBusRegisterMetaType returns int directly, not an object with .id() method.

This critical issue was flagged in a previous review but remains unfixed. In both Qt5 and Qt6, qDBusRegisterMetaType<T>() returns int directly—the type ID. Calling .id() on an int will cause a compilation failure.

Apply this diff to fix:

 int FreedesktopImage::metaType()
 {
-    return qDBusRegisterMetaType<FreedesktopImage>().id();
+    return qDBusRegisterMetaType<FreedesktopImage>();
 }
src/leveldb/include/leveldb/env.h (1)

191-193: Env gained Shutdown(); EnvWrapper must forward it.
Without a forwarder, Shutdown() on an EnvWrapper won’t reach the underlying Env, risking resource leaks.

Apply:

 class LEVELDB_EXPORT EnvWrapper : public Env {
@@
   void SleepForMicroseconds(int micros) override {
     target_->SleepForMicroseconds(micros);
   }
+
+  void Shutdown() override {
+    target_->Shutdown();
+  }

Also verify all Env subclasses override Shutdown() or intentionally inherit no‑op.

#!/bin/bash
# Find Env subclasses and whether they override Shutdown()
rg -nP --type=cpp -C2 'class\s+\w+\s*:\s*public\s+Env\b' src
rg -nP --type=cpp '\bShutdown\s*\(' src
src/leveldb/util/env_windows.cc (1)

680-684: Block new work after shutdown and use release semantics.
Add a guard in Schedule() to refuse tasks once shutdown is requested; otherwise items can queue with no worker. Optionally use release store.

Apply:

 void WindowsEnv::Schedule(
     void (*background_work_function)(void* background_work_arg),
     void* background_work_arg) {
   background_work_mutex_.Lock();
+
+  // Do not accept new work after shutdown has been requested.
+  if (shutdown_requested_.load(std::memory_order_acquire)) {
+    background_work_mutex_.Unlock();
+    return;
+  }
@@
-  if (background_work_queue_.empty()) {
+  if (background_work_queue_.empty()) {
     background_work_cv_.Signal();
   }
@@
   background_work_queue_.emplace(background_work_function, background_work_arg);
   background_work_mutex_.Unlock();
 }
 
-void Shutdown() override {
-  shutdown_requested_ = true;
+void Shutdown() override {
+  shutdown_requested_.store(true, std::memory_order_release);
   background_work_cv_.SignalAll();
 }
src/qt/bitcoin.cpp (2)

497-502: Fix comment/timeout mismatch; consider a named constant

Comment says 500ms but code uses 1000ms. Align and prefer a constexpr.

Apply:

-    // Delay shutdown signal by 500 milliseconds
-    QTimer::singleShot(1000, this, [this]() {
+    constexpr int kShutdownDelayMs = 1000;
+    // Delay shutdown signal by kShutdownDelayMs
+    QTimer::singleShot(kShutdownDelayMs, this, [this]() {
         // Request shutdown from core thread after delay
         Q_EMIT requestedShutdown();
     });

233-234: Guard showCloseWindow() against null (or lazily init)

Avoid potential null deref; safe to guard even if currently called after init.

Apply:

-void BitcoinApplication::showCloseWindow(){
-    shutdownWindow->show();
+void BitcoinApplication::showCloseWindow() {
+    if (!shutdownWindow) {
+        shutdownWindow.reset(ShutdownWindow::showShutdownWindow(window));
+    }
+    shutdownWindow->show();
 }

Also applies to: 504-506

depends/patches/native_qt/rcc_hardcode_timestamp.patch (1)

1-24: Reproducible builds: don’t hardcode RCC timestamp; honor SOURCE_DATE_EPOCH/QT_RCC_SOURCE_DATE_OVERRIDE

This removes Qt’s supported determinism controls and hardcodes 1, which is brittle and non‑portable.

  • Revert to upstream logic that consults QT_RCC_SOURCE_DATE_OVERRIDE/SOURCE_DATE_EPOCH.
  • Or drop the patch and set SOURCE_DATE_EPOCH in the build; optionally force RCC --format-version 1 via AUTORCC.
Qt 6 rcc SOURCE_DATE_EPOCH QT_RCC_SOURCE_DATE_OVERRIDE support
depends/hosts/darwin.mk (1)

70-70: Remove duplicate -platform_version from darwin_LDFLAGS.

Line 65 already sets -Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION). Line 70 appends the same flag again, causing duplication. Keep only the other flags on line 70.

Apply this diff:

-darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) -Wl,-no_adhoc_codesign -fuse-ld=lld
+darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-no_adhoc_codesign -fuse-ld=lld
src/qt/guiutil.cpp (1)

100-101: Remove qint32 cast to avoid Y2038 truncation.

Casting nTime to qint32 truncates timestamps beyond 2038. Qt6's fromSecsSinceEpoch accepts 64-bit values directly.

Apply this diff:

-    return dateTimeStr(QDateTime::fromSecsSinceEpoch((qint32)nTime));
+    return dateTimeStr(QDateTime::fromSecsSinceEpoch(nTime));
contrib/rpm/README.md (1)

75-78: Update legacy Qt version reference from Qt4 to Qt5.

The documentation mentions Qt4 as the legacy alternative, but the PR migrates from Qt5 to Qt6. The text should reference Qt5 and the build flag should be _use_qt5 1 to accurately reflect the migration path.

Apply this diff:

-The RPM spec file will by default build the GUI client linked against the Qt6
-libraries. If you wish instead to link against the Qt4 libraries you need to
-pass the switch `-D '_use_qt4 1'` at build time to the `rpmbuild` or `mock`
-command used to build the packages.
+The RPM spec file will by default build the GUI client linked against the Qt6
+libraries. If you wish instead to link against the Qt5 libraries you need to
+pass the switch `-D '_use_qt5 1'` at build time to the `rpmbuild` or `mock`
+command used to build the packages.
depends/patches/native_qt/qtbase_skip_tools.patch (2)

16-22: Critical: Removing qt_internal_create_wrapper_scripts() breaks Qt module configuration.

This removal was previously flagged as critical. The wrapper scripts (qt-cmake, qt-configure-module, qt-toolchain) are required by Qt modules during configuration. Without them, later qttools/qttranslations configure phases will fail.


41-49: Unconditional removal of trace tools requires feature flag or explicit disable.

The removal of tracepointgen and tracegen was previously flagged. These tools are only needed when Qt tracing is enabled, but removing them unconditionally will break builds if tracing features are later enabled.

depends/patches/native_qt/qttools_skip_dependencies.patch (1)

3-3: Fix typo in patch description.

"installatiion" should be "installation".

doc/build-unix.md (1)

266-269: Use FreeBSD-compatible parallelism flag.

nproc is not available by default on FreeBSD. Replace with sysctl -n hw.ncpu or remove -j flag.

README.md (1)

109-113: Update Debian/Ubuntu GUI dependencies to Qt6.

The GUI dependencies still reference Qt5 packages. These should be updated to Qt6 equivalents to match the Qt6 migration.

depends/funcs.mk (4)

304-305: Copy patches from $(1)_patches_path, not hardcoded directory.

Current cp fails when patches live under a custom path (e.g., qt patches).

-	$(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
+	$(AT)$(foreach patch,$($(1)_patches),cd $($(1)_patches_path); cp $(patch) $($(1)_patch_dir) ;)

75-79: Respect per-package patch location; hardcoded path breaks qt/native_qt.

Use $(1)_patches_path with a sane default to avoid 404s and wrong hashes.

-define int_get_build_recipe_hash
-$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1))
+define int_get_build_recipe_hash
+$(eval $(1)_patches_path?=$(PATCHES_PATH)/$(1))
+$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $($(1)_patches_path)/,$($(1)_patches)) | cut -d" " -f1))
 final_build_id_long+=:[$(1)_all_file_checksums]$(foreach checksum,$($(1)_all_file_checksums),$(shell echo ":$(checksum)")):
 $(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
 endef

81-92: Initialize $(1)_all_dependencies before use.

Currently unused/commented -> build-id misses deps and unpack step fails.

 $(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
-# $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($(1)_dependencies)))
-# $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
+$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
 $(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))

219-219: PKG_CONFIG_SYSROOT_DIR should use target prefix, not "/".

Hardcoding "/" can resolve host libs during cross-compilation.

-$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=/
+$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=$($($(1)_type)_prefix)
#!/bin/bash
# Show effective PKG_CONFIG_* for a sample package after make expansion (best-effort grep)
rg -n 'PKG_CONFIG_(LIBDIR|PATH|SYSROOT_DIR)=' -C2 depends/funcs.mk
depends/toolchain.cmake.in (2)

124-135: Remove PKG_CONFIG_ARGN; CMake FindPkgConfig won’t read it.

PKG_CONFIG_ARGN isn’t consumed by pkg_check_modules(); pass STATIC in calls instead.

-  set(PKG_CONFIG_ARGN --static)
+  # For static queries, pass STATIC in each pkg_check_modules() invocation.
#!/bin/bash
# Find pkg_check_modules() sites to add STATIC
rg -nP --type=cmake '\bpkg_check_modules\s*\(' -C2

160-172: Use consistent blank-string detection and drop redundant wallet_packages var.

Match whitespace-only like elsewhere; avoid reassigning wallet_packages.

-set(wallet_packages @wallet_packages@)
 set(bdb_packages @bdb_packages@)
-if("${wallet_packages}" STREQUAL "" OR "${bdb_packages}" STREQUAL "")
+if("@wallet_packages@" MATCHES "^[ ]*$" OR "${bdb_packages}" MATCHES "^[ ]*$")
   set(WITH_BDB OFF CACHE BOOL "")
 else()
   set(WITH_BDB ON CACHE BOOL "")
 endif()
depends/packages/native_qt.mk (2)

103-110: Fix undefined var in fetch: use _file_name, not _download_file.

This breaks the first fetch and stalls the build.

-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \

155-158: Guard translations move to avoid error when directory is absent.

Prevent mv from failing the step if translations/ isn’t present.

-  rm -rf doc/ && \
-  mv translations/ ..
+  rm -rf doc/ && \
+  if [ -d translations ]; then mv translations ..; fi
src/qt/CMakeLists.txt (1)

57-74: Require Qt6 LinguistTools before using lrelease/lupdate/lconvert.

Ensure tool targets exist in this scope.

+# Ensure Qt6 Linguist tools are available for translation rules in this dir
+find_package(Qt6 COMPONENTS LinguistTools REQUIRED)
#!/bin/bash
# Verify LinguistTools is found somewhere in tree; if absent, add above.
rg -nP 'find_package\s*\(\s*Qt6\b[^\)]*LinguistTools' -C2

Also applies to: 396-407

depends/packages/qt.mk (4)

101-102: Conflicting zlib options: choose one.

Both -system-zlib and -qt-zlib are set. Keep only -system-zlib (recommended) to avoid conflicts.

Apply this diff:

 $(package)_config_opts += -system-zlib
-$(package)_config_opts += -qt-zlib
 $(package)_config_opts += -static

55-55: C++ standard conflict: c++20 feature enabled but configure uses c++17.

Line 55 configures Qt with -c++std c++17, but line 197 enables -DQT_FEATURE_cxx20=ON. This inconsistency may break Qt feature checks.

Align both to C++20:

-$(package)_config_opts += -c++std c++17
+$(package)_config_opts += -c++std c++20

277-277: Undefined variable causes fetch failure.

$($(package)_download_file) is undefined. Use $($(package)_file_name) instead.

Apply this diff:

-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \

191-194: Darwin OBJC/OBJCXX environment variables defined but never used.

The Darwin-specific $(package)_config_env_darwin (containing OBJC/OBJCXX) is set here but not included in the configure or build commands (lines 344, 348). Apple toolchains may not pick up the right compilers/flags.

Apply this diff to include Darwin env in configure and build:

 define $(package)_config_cmds
   cd qtbase && \
-  $($(package)_config_env) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
+  $($(package)_config_env) $($(package)_config_env_darwin) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
 endef

 define $(package)_build_cmds
-  $($(package)_config_env) cmake --build . --parallel
+  $($(package)_config_env) $($(package)_config_env_darwin) cmake --build . --parallel
 endef

Also applies to: 344-344, 348-348

src/qt/automintmodel.cpp (2)

59-64: Lock-contention can stall processing; re-arm timer and clear throttle on failure.

This issue was flagged in a previous review but remains unaddressed. When lock acquisition fails, you requeue the batch and return without re-arming the timer or resetting lastUpdateTime. This can prevent retry for up to 120 seconds.

Apply this fix to ensure timely retry:

         if (!lock_main) {
             // Put back batch if we couldn't proceed
             LOCK(cs);
             txs.insert(txs.end(), batch.begin(), batch.end());
+            lastUpdateTime = 0;
+            resetTimer();
             return;
         }

Based on past review comments.


97-97: Wrong wallet used: replace pwalletMain with wallet.

This critical issue was flagged in a previous review but remains unaddressed. You gather UTXOs from wallet->mapWallet (line 83) but call AvailableCoinsForLMint on the global pwalletMain. In multi-wallet setups, this miscomputes credit.

-        pwalletMain->AvailableCoinsForLMint(valueAndUTXOs, &coinControl);
+        wallet->AvailableCoinsForLMint(valueAndUTXOs, &coinControl);

Based on past review comments.

🧹 Nitpick comments (9)
depends/patches/qt/rcc_hardcode_timestamp.patch (1)

9-21: Consider using 0 instead of 1 and document the rationale.

Hardcoding lastmod to 1 removes all timestamp information from RCC-compiled resources. A few observations:

  1. Sentinel value convention: Typically, 0 is used as a sentinel to indicate "no timestamp" or "invalid timestamp," not 1. Using 1 (which represents January 1, 1970, 00:00:00.001 UTC) could be misinterpreted as a real timestamp.

  2. Redundant cast: The cast quint64(1) is unnecessary since 1 is already compatible with quint64. Simply 1 would suffice.

  3. Documentation: Consider adding an inline comment explaining why the timestamp is hardcoded (e.g., "Hardcoded for reproducible builds; see patch header").

-        quint64 lastmod = quint64(1);
+        quint64 lastmod = 0;  // Hardcoded to ensure reproducible builds regardless of SOURCE_DATE_EPOCH
src/crypto/MerkleTreeProof/blake2/blake2.h (1)

1-11: Move macro definitions inside the include guard to follow best practices (though the stated concern about redefinition warnings is technically incorrect).

The macros at lines 1-11 are placed before the include guard. While this is unconventional, identical macro redefinitions do not generate compiler warnings—the C preprocessor only warns on conflicting definitions. Testing shows blake2.h is included multiple times transitively in compilation units like mtp.cpp (via ref.h), but since the macros redefine to the exact same text each time, no warnings occur.

However, moving the macros inside the include guard (after line 30) is still recommended as a best practice to:

  • Avoid unnecessary macro re-processing on each inclusion
  • Follow conventional C/C++ header organization patterns
  • Keep macro scope clearly defined

The suggested refactor remains valid; only the technical justification needs correction.

src/qt/sendcoinsentry.cpp (1)

20-21: Cache the regex; optionally block signal during sanitize setText

Avoid recompiling on each keystroke and minor recursion churn.

Apply:

+#include <QRegularExpression>
+namespace {
+static const QRegularExpression kCtrlChars(QStringLiteral("[\\x00-\\x1F\\x7F]"));
+}
...
-        QString sanitized = text;
-        sanitized.remove(QRegularExpression("[\\x00-\\x1F\\x7F]"));
+        QString sanitized = text;
+        sanitized.remove(kCtrlChars);
         if (sanitized != text) {
-            ui->messageTextLabel->setText(sanitized);
+            QSignalBlocker b(ui->messageTextLabel);
+            ui->messageTextLabel->setText(sanitized);
             return;
         }

Also applies to: 87-91

depends/patches/qt/qtbase_avoid_qmain.patch (1)

11-21: Validate Windows entrypoint impact; gate to target toolchains

Removing QT_NEEDS_QMAIN can affect GUI entrypoint/linking. Verify MinGW and MSVC builds (GUI subsystem) and runtime startup.

  • If only needed for MinGW DLL linking or specific environments, guard the change with a CMake option or toolchain check to avoid wider regressions.
depends/toolchain.cmake.in (1)

110-113: Avoid appending "/" to CMAKE_PREFIX_PATH (confusing, likely no-op).

With FIND_ROOT_PATH_MODE_PACKAGE=ONLY, adding "/" to CMAKE_PREFIX_PATH doesn’t help package resolution and is misleading. Consider removing or add a rationale comment.

-if(NOT "/" IN_LIST CMAKE_PREFIX_PATH)
-  list(APPEND CMAKE_PREFIX_PATH "/")
-endif()
+# Intentionally left empty; avoid appending "/" to CMAKE_PREFIX_PATH.
depends/funcs.mk (1)

254-271: Minor: prefer boolean conversion for CMAKE_VERBOSE_MAKEFILE and avoid trailing slash in LIBDIR.

Harmless, but slightly cleaner.

-               -DCMAKE_INSTALL_LIBDIR=lib/ \
-               -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-               -DCMAKE_VERBOSE_MAKEFILE:BOOL=$(V) \
+               -DCMAKE_INSTALL_LIBDIR=lib \
+               -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+               -DCMAKE_VERBOSE_MAKEFILE:BOOL=$$(if $(V),ON,OFF) \
depends/packages/qt.mk (3)

52-88: Remove duplicate configuration options.

Several configuration options are duplicated:

  • -no-egl appears on lines 52 and 58
  • -no-zstd appears on lines 64 and 88

Apply this diff to remove the duplicates:

 $(package)_config_opts = -no-egl
 $(package)_config_opts_debug += -optimized-tools
 $(package)_config_opts += -bindir $(build_prefix)/bin
 $(package)_config_opts += -c++std c++17
 $(package)_config_opts += -confirm-license
 $(package)_config_opts += -no-cups
-$(package)_config_opts += -no-egl
 $(package)_config_opts += -no-eglfs
 $(package)_config_opts += -no-evdev
 $(package)_config_opts += -no-gif
 $(package)_config_opts += -no-glib
 $(package)_config_opts += -no-icu
-$(package)_config_opts += -no-zstd
 $(package)_config_opts += -no-ico

170-180: Remove duplicate Linux configuration options.

The Linux configuration has duplicates:

  • -fontconfig appears on lines 171 and 177
  • -dbus-runtime appears on lines 170 and 180

Apply this diff:

 $(package)_config_opts_linux := -dbus-runtime
 $(package)_config_opts_linux += -fontconfig
 $(package)_config_opts_linux += -no-feature-process
 $(package)_config_opts_linux += -no-feature-xlib
 $(package)_config_opts_linux += -no-xcb-xlib
 $(package)_config_opts_linux += -pkg-config
 $(package)_config_opts_linux += -system-freetype
-$(package)_config_opts_linux += -fontconfig
 $(package)_config_opts_linux += -no-opengl
 $(package)_config_opts_linux += -no-feature-vulkan
-$(package)_config_opts_linux += -dbus-runtime
 $(package)_config_opts_linux += -feature-xcb

141-141: Consider moving -no-feature-vulkan to platform-specific sections.

Line 141 adds -no-feature-vulkan to general config_opts, but it's also specified for Linux on line 179. Since Vulkan is platform-specific, consider keeping it only in the platform-specific sections (darwin, linux, mingw32) rather than in the general options.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 27a1516 and 1f09751.

⛔ Files ignored due to path filters (1)
  • .github/workflows/ci-master.yml is excluded by !**/*.yml
📒 Files selected for processing (98)
  • CMakeLists.txt (1 hunks)
  • Dockerfile (1 hunks)
  • Makefile.am (0 hunks)
  • README.md (7 hunks)
  • autogen.sh (0 hunks)
  • build-aux/m4/ax_boost_base.m4 (0 hunks)
  • build-aux/m4/ax_boost_chrono.m4 (0 hunks)
  • build-aux/m4/ax_boost_filesystem.m4 (0 hunks)
  • build-aux/m4/ax_boost_program_options.m4 (0 hunks)
  • build-aux/m4/ax_boost_system.m4 (0 hunks)
  • build-aux/m4/ax_boost_thread.m4 (0 hunks)
  • build-aux/m4/ax_boost_unit_test_framework.m4 (0 hunks)
  • build-aux/m4/ax_check_compile_flag.m4 (0 hunks)
  • build-aux/m4/ax_check_link_flag.m4 (0 hunks)
  • build-aux/m4/ax_check_preproc_flag.m4 (0 hunks)
  • build-aux/m4/ax_cxx_compile_stdcxx.m4 (0 hunks)
  • build-aux/m4/ax_gcc_func_attribute.m4 (0 hunks)
  • build-aux/m4/ax_pthread.m4 (0 hunks)
  • build-aux/m4/ax_subdirs_configure.m4 (0 hunks)
  • build-aux/m4/bitcoin_find_bdb48.m4 (0 hunks)
  • build-aux/m4/bitcoin_qt.m4 (0 hunks)
  • build-aux/m4/bitcoin_subdir_to_include.m4 (0 hunks)
  • build-aux/m4/l_atomic.m4 (0 hunks)
  • cmake/module/FindQt.cmake (0 hunks)
  • configure.ac (0 hunks)
  • contrib/debian/changelog (1 hunks)
  • contrib/debian/rules (1 hunks)
  • contrib/guix/libexec/build.sh (1 hunks)
  • contrib/rpm/README.md (1 hunks)
  • contrib/rpm/bitcoin.spec (3 hunks)
  • depends/Makefile (3 hunks)
  • depends/config.site.in (1 hunks)
  • depends/funcs.mk (7 hunks)
  • depends/hosts/darwin.mk (1 hunks)
  • depends/packages/libxcb_util_cursor.mk (1 hunks)
  • depends/packages/native_qt.mk (1 hunks)
  • depends/packages/packages.mk (1 hunks)
  • depends/packages/qt.mk (2 hunks)
  • depends/packages/qt_details.mk (1 hunks)
  • depends/packages/zeromq.mk (1 hunks)
  • depends/patches/native_qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/native_qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/native_qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/native_qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/native_qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/patches/qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/qt/memory_resource.patch (0 hunks)
  • depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_qmain.patch (1 hunks)
  • depends/patches/qt/qtbase_platformsupport.patch (1 hunks)
  • depends/patches/qt/qtbase_plugins_cocoa.patch (1 hunks)
  • depends/patches/qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/toolchain.cmake.in (3 hunks)
  • doc/build-unix.md (5 hunks)
  • doc/man/Makefile.am (0 hunks)
  • libbitcoinconsensus.pc.in (0 hunks)
  • src/Makefile.am (0 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2.h (1 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2b.c (1 hunks)
  • src/init.cpp (2 hunks)
  • src/leveldb/include/leveldb/env.h (1 hunks)
  • src/leveldb/util/env.cc (1 hunks)
  • src/leveldb/util/env_posix.cc (3 hunks)
  • src/leveldb/util/env_windows.cc (3 hunks)
  • src/qt/CMakeLists.txt (8 hunks)
  • src/qt/automintmodel.cpp (3 hunks)
  • src/qt/bitcoin.cpp (4 hunks)
  • src/qt/bitcoinamountfield.cpp (1 hunks)
  • src/qt/bitcoingui.cpp (8 hunks)
  • src/qt/clientmodel.cpp (3 hunks)
  • src/qt/coincontroldialog.cpp (1 hunks)
  • src/qt/guiutil.cpp (5 hunks)
  • src/qt/notificator.cpp (3 hunks)
  • src/qt/recentrequeststablemodel.cpp (1 hunks)
  • src/qt/recentrequeststablemodel.h (1 hunks)
  • src/qt/rpcconsole.cpp (3 hunks)
  • src/qt/sendcoinsentry.cpp (2 hunks)
  • src/qt/splashscreen.cpp (1 hunks)
  • src/qt/test/CMakeLists.txt (1 hunks)
  • src/qt/transactionfilterproxy.cpp (1 hunks)
  • src/qt/transactiontablemodel.cpp (2 hunks)
  • src/qt/utilitydialog.cpp (2 hunks)
  • src/qt/winshutdownmonitor.cpp (1 hunks)
  • src/qt/winshutdownmonitor.h (1 hunks)
  • src/secp256k1/Makefile.am (0 hunks)
  • src/secp256k1/build-aux/m4/ax_jni_include_dir.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/bitcoin_secp.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/m4_ax_cxx_compile_stdcxx.m4 (0 hunks)
  • src/secp256k1/configure.ac (0 hunks)
  • src/univalue/Makefile.am (0 hunks)
  • src/univalue/autogen.sh (0 hunks)
  • src/univalue/build-aux/m4/.gitignore (0 hunks)
  • src/univalue/configure.ac (0 hunks)
💤 Files with no reviewable changes (36)
  • src/univalue/autogen.sh
  • build-aux/m4/bitcoin_subdir_to_include.m4
  • src/univalue/build-aux/m4/.gitignore
  • src/univalue/configure.ac
  • doc/man/Makefile.am
  • build-aux/m4/ax_check_compile_flag.m4
  • build-aux/m4/ax_check_preproc_flag.m4
  • build-aux/m4/ax_boost_system.m4
  • build-aux/m4/ax_pthread.m4
  • build-aux/m4/ax_boost_chrono.m4
  • src/Makefile.am
  • build-aux/m4/ax_check_link_flag.m4
  • configure.ac
  • build-aux/m4/ax_boost_base.m4
  • autogen.sh
  • src/secp256k1/build-aux/m4/m4_ax_cxx_compile_stdcxx.m4
  • build-aux/m4/ax_boost_unit_test_framework.m4
  • src/univalue/Makefile.am
  • src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4
  • build-aux/m4/ax_cxx_compile_stdcxx.m4
  • src/secp256k1/configure.ac
  • build-aux/m4/bitcoin_find_bdb48.m4
  • src/secp256k1/build-aux/m4/bitcoin_secp.m4
  • build-aux/m4/bitcoin_qt.m4
  • src/secp256k1/build-aux/m4/ax_jni_include_dir.m4
  • build-aux/m4/ax_boost_program_options.m4
  • cmake/module/FindQt.cmake
  • build-aux/m4/l_atomic.m4
  • build-aux/m4/ax_boost_filesystem.m4
  • Makefile.am
  • build-aux/m4/ax_subdirs_configure.m4
  • build-aux/m4/ax_boost_thread.m4
  • src/secp256k1/Makefile.am
  • depends/patches/qt/memory_resource.patch
  • build-aux/m4/ax_gcc_func_attribute.m4
  • libbitcoinconsensus.pc.in
🚧 Files skipped from review as they are similar to previous changes (21)
  • contrib/debian/changelog
  • src/qt/recentrequeststablemodel.h
  • src/qt/transactiontablemodel.cpp
  • depends/patches/qt/qtbase_skip_tools.patch
  • src/qt/winshutdownmonitor.cpp
  • contrib/guix/libexec/build.sh
  • src/qt/rpcconsole.cpp
  • depends/patches/qt/qttools_skip_dependencies.patch
  • src/qt/utilitydialog.cpp
  • depends/patches/qt/dont_hardcode_pwd.patch
  • src/qt/test/CMakeLists.txt
  • src/leveldb/util/env_posix.cc
  • Dockerfile
  • src/qt/splashscreen.cpp
  • depends/patches/native_qt/qtbase_avoid_native_float16.patch
  • CMakeLists.txt
  • src/crypto/MerkleTreeProof/blake2/blake2b.c
  • depends/patches/native_qt/dont_hardcode_pwd.patch
  • src/qt/bitcoinamountfield.cpp
  • depends/config.site.in
  • depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch
🧰 Additional context used
🧬 Code graph analysis (7)
src/init.cpp (2)
src/leveldb/util/env_posix.cc (2)
  • Default (911-914)
  • Default (911-911)
src/leveldb/util/env_windows.cc (2)
  • Default (854-857)
  • Default (854-854)
src/qt/clientmodel.cpp (1)
src/chainparams.cpp (4)
  • Params (1348-1351)
  • Params (1348-1348)
  • Params (1353-1365)
  • Params (1353-1353)
src/leveldb/util/env.cc (1)
src/init.cpp (2)
  • Shutdown (235-347)
  • Shutdown (235-235)
src/leveldb/util/env_windows.cc (1)
src/leveldb/util/env_posix.cc (1)
  • shutdown_requested_ (732-735)
src/qt/winshutdownmonitor.h (1)
src/qt/winshutdownmonitor.cpp (2)
  • nativeEventFilter (19-54)
  • nativeEventFilter (19-19)
src/crypto/MerkleTreeProof/blake2/blake2.h (1)
src/crypto/MerkleTreeProof/blake2/blake2b.c (9)
  • blake2b_init (102-128)
  • blake2b_init_key (130-175)
  • blake2b_init_param (84-99)
  • blake2b_update (290-328)
  • blake2b_final (371-399)
  • blake2b (432-468)
  • blake2b_long (471-527)
  • blake2b_4r_update (330-368)
  • blake2b_4r_final (401-429)
src/leveldb/include/leveldb/env.h (2)
src/init.cpp (2)
  • Shutdown (235-347)
  • Shutdown (235-235)
src/leveldb/util/env.cc (2)
  • Shutdown (90-90)
  • Shutdown (90-90)
🔇 Additional comments (38)
src/qt/winshutdownmonitor.h (1)

21-21: LGTM! Correct Qt6 API adaptation.

The signature change from long* to qintptr* correctly aligns with Qt6's QAbstractNativeEventFilter::nativeEventFilter API and ensures cross-platform portability. The implementation in winshutdownmonitor.cpp is consistent with this declaration.

src/qt/notificator.cpp (3)

30-55: LGTM! FreedesktopImage class structure is well-formed.

The class declaration correctly sets up the custom DBus type with appropriate operator overloads, metadata accessors, and the Q_DECLARE_METATYPE macro.


82-84: LGTM! Type registration is properly placed.

Registering the custom DBus type after confirming the interface is valid ensures it's available before any notification calls.


154-158: LGTM! QVariant::fromValue is the correct Qt6 API.

The implementation properly converts the image to the custom type and wraps it in a QVariant for DBus marshalling.

depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (2)

10-14: Implementation follows the correct pattern.

The patch correctly adds the _GLIBCXX_VISIBILITY macro mapping using the same dummyVariadicFunctionMacro pattern as the existing __attribute__ and __declspec__ workarounds. The placement and syntax are appropriate.


1-5: The patch is still necessary for Qt 6.7.3.

QTBUG-83160 remains in "Reported" status with no fix versions recorded, and the _GLIBCXX_VISIBILITY moc parsing issue is confirmed as a known ongoing problem. This patch implements a valid workaround that is still required when upgrading to Qt 6.7.3.

src/init.cpp (2)

46-46: Include needed for new shutdown API — OK.
Header addition is correct and scoped.


345-346: LevelDB environment shutdown placement is verified as correct.

The verification confirms no LevelDB operations occur after the Shutdown() call on line 345. The LogPrintf() on line 346 is a logging utility call, not a LevelDB operation. The function terminates immediately thereafter with no further code execution.

src/leveldb/util/env_windows.cc (1)

777-780: Graceful background-thread exit — OK.
Early return on shutdown inside wait loop is correct.

src/leveldb/util/env.cc (1)

90-91: Platform overrides confirmed; base no-op implementation is appropriate.

WindowsEnv and PosixEnv both properly override Shutdown() with background thread cleanup via shutdown_requested_ flag and condition variable signaling. No custom Env subclasses detected outside the wrapper pattern. Code is sound.

src/qt/recentrequeststablemodel.cpp (1)

244-247: LGTM: Qt6 time API migration

Comparison via toSecsSinceEpoch() is correct and equivalent for ordering.

src/qt/transactionfilterproxy.cpp (1)

15-17: LGTM: Use fromSecsSinceEpoch for sentinel dates

Qt6-friendly and preserves previous behavior.

src/qt/clientmodel.cpp (1)

166-172: LGTM: Qt6 time API migration

fromSecsSinceEpoch() usage is correct for block/genesis/startup times and signal emission.

Also applies to: 287-291, 372-376

depends/patches/qt/qtbase_avoid_native_float16.patch (1)

1-37: Well-documented compatibility patch.

The patch conservatively disables native float16 support to avoid libgcc compatibility issues on Linux platforms. The rationale is clearly documented with a reference to the relevant GCC commit, and includes a note about when this can be removed (libgcc 12.x+).

src/qt/guiutil.cpp (1)

310-319: Good refactor: suffix extraction centralized.

The new ExtractFirstSuffixFromFilter helper eliminates code duplication in getSaveFileName and getOpenFileName, improving maintainability.

src/qt/bitcoingui.cpp (2)

314-365: Consistent Qt6 shortcut migration.

The shortcuts have been properly migrated from Qt::ALT constants to string-based Alt+%1 format, which is more portable across platforms and aligns with Qt6 best practices. The sequential numbering with key++ ensures unique shortcuts.


389-389: Correct use of bitwise OR for key combinations.

Using Qt::CTRL | Qt::Key_Q (bitwise OR) instead of + is the correct Qt API for combining keyboard modifiers and keys.

Also applies to: 462-463

depends/packages/libxcb_util_cursor.mk (1)

1-31: Standard package definition for libxcb_util_cursor.

The package definition follows the established pattern with appropriate static linking configuration, integrity verification via SHA256 hash, and standard build lifecycle commands.

depends/packages/packages.mk (1)

6-12: Proper Qt package integration for cross-compilation.

The changes correctly:

  1. Add libxcb_util_cursor to the Linux Qt package set (matching the new package definition)
  2. Align FreeBSD Qt packages with Linux (appropriate given shared X11 dependencies)
  3. Handle native Qt packages for cross-compilation scenarios
contrib/debian/rules (1)

15-15: Verify Qt version logic aligns with actual dependency declarations and migration status.

Inconsistency found: The changelog entry (0.14.1-trusty3) documents "Build with qt5 if we are on a non-Ubuntu distro," but line 15 uses qt6 for non-Ubuntu instead. Additionally, the control file still lists qt4-qmake, libqt4-dev and qttools5-dev-tools rather than qt6 packages. Clarify whether:

  1. Line 15 should use qt5 (matching the documented intent and dependency packages)
  2. The control file Build-Depends need updating to reflect a qt6 migration
  3. This represents an incomplete migration that requires coordinated updates across rules, control, and changelog
depends/patches/qt/qtbase_platformsupport.patch (1)

1-34: LGTM! Well-documented upstream fix.

The patch correctly prevents creation of an empty InputSupportPrivate module by refining the feature-check condition. The upstream reference and CMake version guard are appropriate.

contrib/rpm/bitcoin.spec (2)

12-12: LGTM! Qt6 buildargs correctly updated.

The change from --with-gui=qt5 to --with-gui=qt6 aligns with the Qt6 migration.


70-73: LGTM! Qt6 build dependencies updated.

The BuildRequires correctly specify Qt6 packages: qt6-qtbase-devel and qt6-linguist.

depends/patches/native_qt/qttools_skip_dependencies.patch (2)

7-18: LGTM! LLVM/Clang dependency correctly disabled for minimal build.

Commenting out the WrapLibClang package finding is appropriate for builds that don't require Clang-based Qt tools.


19-36: LGTM! Linguist tool selection is reasonable.

The patch keeps essential translation tools (lrelease, lupdate, lconvert) while removing optional components (lprodump, lrelease-pro, lupdate-pro, and the linguist GUI). The fake Linguist module is preserved for CMake compatibility.

depends/Makefile (2)

172-172: LGTM! Qt native packages correctly integrated.

Adding $(qt_native_packages_) to native_packages ensures Qt6 native build tools are included in the build.


275-275: LGTM! Install target correctly updated for CMake workflow.

Removing the config.site dependency reflects the migration from Autotools to CMake-based builds. The install target now only depends on toolchain.cmake, which is the correct approach.

depends/patches/qt/qtbase_plugins_cocoa.patch (1)

1-21: LGTM! Well-scoped workaround for CMake issue.

The patch correctly works around CMake issue 23464 for older CMake versions (<3.25) when QT_FEATURE_sessionmanager is disabled. The guards ensure the workaround only applies when necessary.

doc/build-unix.md (3)

26-35: LGTM! Quick build instructions correctly updated for CMake.

The build instructions properly reflect the CMake-based workflow with appropriate toolchain and build commands.


55-55: LGTM! Build requirements updated for CMake.

The dependencies now correctly include cmake instead of autotools.


93-96: LGTM! Qt6 packages correctly documented.

The Fedora section now specifies Qt6 packages (qt6-qttools-devel, qt6-qtbase-devel), aligning with the Qt6 migration.

README.md (3)

120-125: LGTM! Fedora dependencies correctly updated.

The Fedora section properly specifies CMake and Qt6 packages.


200-222: LGTM! Cross-compilation section well-organized.

The cross-compilation instructions clearly document supported HOST platforms and provide a complete CMake-based example.


133-164: LGTM! Build instructions updated for CMake workflow.

The build instructions properly document the CMake-based process with dependencies, configuration, and building steps.

depends/toolchain.cmake.in (2)

17-19: LGTM: correct cross-compiler target injection.

Setting CMAKE_{C,CXX,OBJCXX}_COMPILER_TARGET for cross builds is appropriate here.


141-146: Qt6_ROOT gating looks good.

Tying Qt6 discovery to depends path when BUILD_GUI is ON is correct.

depends/packages/qt_details.mk (1)

1-26: Cannot programmatically verify SHA256 hashes in sandbox; request manual validation.

The sandbox environment lacks network access and verification tools needed to download Qt 6.7.3 files and compute their SHA256 checksums. All hashes in the configuration are correctly formatted (64 hexadecimal characters), and the file naming and version metadata are internally consistent. However, verification against actual upstream files must be done at deployment/fetch time by running the provided shell script in an environment with network access and sha256sum available.

src/qt/CMakeLists.txt (1)

14-14: The review comment is incorrect.

Qt6::Core is explicitly included in qt_components at line 230 and provided to find_package(Qt 6.7.3 MODULE REQUIRED COMPONENTS ${qt_components}) in the root CMakeLists.txt. The add_subdirectory(src) call occurs after this find_package invocation, and src/qt is only added as a subdirectory when BUILD_GUI is enabled—the same condition that triggers the Qt package discovery. The get_target_property call at line 14 is therefore safe and cannot fail.

Likely an incorrect or invalid review comment.


C_STANDARD ?= c11
CXX_STANDARD ?= c++17
CXX_STANDARD ?= c++20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify C++20 requirement with Qt6 and document compiler requirements.

The C++ standard has been upgraded from C++17 to C++20. Ensure that:

  1. This aligns with Qt6's requirements or recommendations
  2. All target platforms support C++20 (GCC 8+, Clang 10+, MSVC 2019+)
  3. Build documentation reflects the updated compiler requirements

🌐 Web query:

What C++ standard does Qt 6.7.3 require or recommend?

💡 Result:

Qt 6 (including 6.7.3) officially requires C++17; C++20 features are supported when you build with a C++20 compiler but the baseline requirement is C++17. [1][2]

Sources:
[1] Qt documentation — C++20 overview (Qt 6).
[2] Qt 6.7 release notes / what's new.


I need to verify whether C++20 features are actually being used in the codebase to justify this requirement, since Qt6 only requires C++17.


🏁 Script executed:

#!/bin/bash
# Check for C++20-specific features in the codebase
# Search for C++20 features: concepts, requires, co_await, co_yield, etc.
echo "=== Searching for C++20 keywords ==="
rg -n --type=cpp --type=h "concept\s+|requires\s*\(|co_await|co_yield|co_return|operator<=>" 2>/dev/null | head -20

echo -e "\n=== Checking for C++20 standard library features ==="
rg -n --type=cpp --type=h "<ranges>|<concepts>|std::format|std::span" 2>/dev/null | head -20

echo -e "\n=== Checking for documentation mentioning C++ standard ==="
fd -e md -e txt -e rst | xargs rg -l "C\+\+|compiler|standard" 2>/dev/null | head -10

Length of output: 395


Let me check the build documentation and the broader context of this change:


🏁 Script executed:

#!/bin/bash
echo "=== Checking main README for C++ requirements ==="
cat README.md 2>/dev/null | grep -A5 -B5 "C++" || echo "Not found in README"

echo -e "\n=== Checking depends/Makefile context ==="
sed -n '40,60p' depends/Makefile

echo -e "\n=== Looking for Qt version references ==="
rg -n "qt|Qt|QT" depends/Makefile | head -20

echo -e "\n=== Checking CMakeLists.txt for C++ standard ==="
rg -n "CXX_STANDARD\|CMAKE_CXX_STANDARD" --type=cmake | head -10

Length of output: 1173


C++20 requirement lacks justification and documentation—document rationale or revert to C++17.

Verification confirms the concern:

  • Qt 6.7.3 officially requires only C++17, not C++20
  • Codebase contains zero C++20-specific features (no concepts, ranges, spaceship operator, etc.)
  • README and build documentation do not document the C++20 requirement

Either:

  1. Document why C++20 is required if this is intentional, or
  2. Revert to C++17 to align with Qt6's baseline requirement and reduce compiler constraints
🤖 Prompt for AI Agents
In depends/Makefile around line 50, CXX_STANDARD is set to c++20 without any
documentation or justification; either revert it to the safer baseline or
document why c++20 is required. Fix by one of two actions: (A) revert the
Makefile line to "CXX_STANDARD ?= c++17" and run CI/local builds to confirm
nothing breaks, then update any packaging/build scripts if they assumed c++20;
or (B) keep c++20 but add a comment above the line and a short note in
README/build docs listing the specific C++20 features the code uses and the
minimum compiler versions required (and link to Qt compatibility), so the
requirement is explicit and justified.

Comment on lines 128 to +141
$(package)_config_opts_darwin = -no-dbus
$(package)_config_opts_darwin += -no-opengl
$(package)_config_opts_darwin += -pch
$(package)_config_opts_darwin += -no-feature-corewlan
$(package)_config_opts_darwin += -no-freetype
$(package)_config_opts_darwin += -no-pkg-config
$(package)_config_opts_darwin += QMAKE_MACOSX_DEPLOYMENT_TARGET=$(OSX_MIN_VERSION)
$(package)_config_opts += -no-feature-vulkan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify Darwin options are not being overwritten.

Darwin config options are defined at lines 138-141 using +=, then redefined at line 163 using := (which will overwrite). A past review noted this issue was addressed, but the current code still has this pattern. Please verify this is intentional and all required Darwin flags are present in the final assignment.

Run this script to check if the earlier flags are preserved:

Also applies to: 163-169


🏁 Script executed:

#!/bin/bash
# Check what Darwin flags would be set

rg -A 10 'config_opts_darwin' depends/packages/qt.mk

Length of output: 1136


Confirmed: Darwin config options are being overwritten and -no-feature-corewlan is being lost.

The second assignment at line 163 uses := which resets the variable, removing -no-feature-corewlan that was added at line 140. The final Darwin flags become: -no-dbus -no-opengl -pch -no-feature-printsupport -no-freetype -no-pkg-config

This appears intentional (flags were replaced, not just duplicated), but it removes a flag that was explicitly added in the first block. Verify that removing -no-feature-corewlan is desired, or change line 163 from := to = and lines 164+ from += to += to preserve the earlier flags.

🤖 Prompt for AI Agents
In depends/packages/qt.mk around lines 138–163 the Darwin-specific flags added
at lines 138–141 (including -no-feature-corewlan) are being clobbered later
because the variable is reassigned with :=; change the later assignment to use =
(or += where appropriate) instead of := so the earlier flags are preserved —
specifically replace the := reassignment with = and ensure subsequent additions
use += so -no-feature-corewlan is not lost.

Comment on lines 59 to 65
TRY_LOCK(cs_main, lock_main);
if (!lock_main) {
// Put back batch if we couldn't proceed
LOCK(cs);
txs.insert(txs.end(), batch.begin(), batch.end());
return;
TRY_LOCK(cs, lock);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical syntax error: missing closing brace for the if statement.

Line 60 opens an if (!lock_main) { block, but there's no closing brace before line 65. This will cause a compilation failure.

Add the missing closing brace:

         if (!lock_main) {
             // Put back batch if we couldn't proceed
             LOCK(cs);
             txs.insert(txs.end(), batch.begin(), batch.end());
             return;
+        }
         TRY_LOCK(cs, lock);
🤖 Prompt for AI Agents
In src/qt/automintmodel.cpp around lines 59 to 65, the if (!lock_main) { block
opened at line 60 is missing its closing brace; add a single closing brace
immediately after the return; (i.e., close the if block before the subsequent
TRY_LOCK(cs, lock);) so the control flow and braces are balanced and compilation
succeeds.

if (!lock_main) {
// Put back batch if we couldn't proceed
LOCK(cs);
txs.insert(txs.end(), batch.begin(), batch.end());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical issue: undefined variable batch.

The code references batch.begin() and batch.end() but the batch variable is never declared or initialized in this function. This will cause a compilation error.

You need to declare and populate the batch variable before using it. Typically, you would extract a batch from txs before attempting lock acquisition:

 void IncomingFundNotifier::check()
 {
     CAmount credit = 0;
     std::vector<uint256> immatures;
+    std::vector<uint256> batch;
     CCoinControl coinControl;
     coinControl.nCoinType = CoinType::ONLY_NOT1000IFMN;
 
+    // Extract batch before attempting locks
+    {
+        LOCK(cs);
+        if (txs.empty()) {
+            return;
+        }
+        // Extract up to N transactions for this batch
+        size_t batchSize = std::min(txs.size(), size_t(100));
+        batch.insert(batch.end(), txs.end() - batchSize, txs.end());
+        txs.resize(txs.size() - batchSize);
+    }
+
     {
         TRY_LOCK(cs_main, lock_main);
🤖 Prompt for AI Agents
In src/qt/automintmodel.cpp around line 63, the code uses
batch.begin()/batch.end() but `batch` is not declared or initialized; declare a
variable with the correct container type (matching txs, e.g. std::vector<TxType>
or QVector<TxType>) and populate it from txs (for example by taking the intended
slice/batch of elements via iterators or index range) before calling
txs.insert(txs.end(), batch.begin(), batch.end()); ensure the batch size/indices
are computed safely and that any necessary locking or move semantics are
respected when extracting elements from txs.

Comment on lines 115 to 119
for (const auto& it : wallet->mapWallet) {
if (it.second.GetAvailableCredit() > 0 || it.second.GetImmatureCredit() > 0) {
to_add.push_back(it.first);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Missing declaration of to_add vector.

The code uses to_add.push_back(it.first) on line 117 and to_add.begin()/to_add.end() on line 125, but the to_add vector is never declared in this function.

Add the declaration before use:

 void IncomingFundNotifier::importTransactions()
 {
+    std::vector<uint256> to_add;
+
     LOCK2(cs_main, cs);
     LOCK(wallet->cs_wallet);
🤖 Prompt for AI Agents
In src/qt/automintmodel.cpp around lines 115 to 119, the code uses
to_add.push_back(...) and iterates over to_add later but never declares to_add;
declare it before use (e.g. add a line like "std::vector<uint256> to_add;"
immediately before the for loop) so the vector exists with the correct element
type to collect wallet->mapWallet keys.

@aleflm aleflm force-pushed the dev-aleflm-update-qt6-rebased branch from 1f09751 to 73216db Compare October 26, 2025 14:27
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
depends/patches/qt/rcc_hardcode_timestamp.patch (1)

1-24: Reconsider this approach - removes standard reproducible build support.

This patch hardcodes the timestamp to 1 and removes support for SOURCE_DATE_EPOCH and QT_RCC_SOURCE_DATE_OVERRIDE, which are the standard Qt-supported mechanisms for reproducible builds. While the goal of enabling package reuse is valid, this approach:

  • Removes the flexibility that environment variables provide for different build scenarios
  • Contradicts the standard reproducible builds practice of using SOURCE_DATE_EPOCH
  • Makes the timestamp inflexible across different distributions or build contexts

Alternative approaches to consider:

  1. Set SOURCE_DATE_EPOCH=1 in the build environment (preserves the standard mechanism)
  2. Use --format-version 1 for rcc, which doesn't embed timestamps
  3. Keep the environment variable support and set a fixed value in the build system rather than patching Qt source

This maintains compatibility with standard reproducible build practices while achieving the same deterministic result.

depends/funcs.mk (1)

107-161: Remove or activate commented-out build properties and logging sections.

Lines 107-161 contain commented-out implementations for build logging, friendly filenames, and build properties calculation. This creates confusion about the actual build behavior. Either remove this dead code or integrate it if it's required for the new build system.

README.md (1)

200-222: Cross-compilation section has inconsistent formatting.

The section header "Cross-Compilation" appears mid-table (line 200), creating a confusing structure where table headers appear both before and after the section heading.

Restructure to place the section header before the table:

-| Host Target              | Platform                  |
-|--------------------------|---------------------------|
 ## Cross-Compilation
-
+
 To build for other platforms, specify the `HOST` variable when building dependencies:
-
+
 | HOST Platform           | Description               |
 |--------------------------|---------------------------|
 | `x86_64-pc-linux-gnu`   | Linux 64-bit (default)   |
♻️ Duplicate comments (26)
src/qt/splashscreen.cpp (1)

24-24: Confirm: Remove unnecessary #include <QScreen>.

The past review correctly identified that QScreen is not used in the active code. Verification shows:

  • Active constructor (lines 30-76) has no QScreen references
  • Other active methods (lines 190-292) have no QScreen references
  • The only potential usage is in the commented code (line 180's QApplication::desktop() call)

Remove this include until the commented code is re-enabled and properly migrated to Qt6's QScreen APIs.

Apply this diff:

-#include <QScreen>
depends/packages/zeromq.mk (1)

17-17: Fix Make variable syntax to properly capture shell environment variable.

The current syntax "$(LIBRARY_PATH)" uses Make variable expansion and will evaluate to an empty string since LIBRARY_PATH is not a Make variable—it's a shell environment variable. This breaks the backup mechanism, leaving LIB_LIBRARY_BACKUP empty.

Apply this diff to use proper shell variable expansion:

-$(package)_config_env_x86_64_darwin = LIB_LIBRARY_BACKUP="$(LIBRARY_PATH)" LIBRARY_PATH=""
+$(package)_config_env_x86_64_darwin = LIB_LIBRARY_BACKUP="$${LIBRARY_PATH}" LIBRARY_PATH=""

The $$ escapes to a single $ during Make processing, allowing the shell to expand ${LIBRARY_PATH} at runtime.

src/qt/notificator.cpp (1)

149-152: Critical issue: The previously identified compile error is still present.

The code still calls .id() on the return value of qDBusRegisterMetaType<FreedesktopImage>(), but in Qt6 this function returns int directly, not an object with an .id() method. This was flagged in a previous review and marked as addressed, but the fix appears to have been lost (possibly during the rebase mentioned in the PR description).

Apply this diff:

 int FreedesktopImage::metaType()
 {
-    return qDBusRegisterMetaType<FreedesktopImage>().id();
+    return qDBusRegisterMetaType<FreedesktopImage>();
 }
depends/patches/native_qt/rcc_hardcode_timestamp.patch (1)

1-24: Same issue as qt/rcc_hardcode_timestamp.patch - removes standard reproducible build support.

This patch has the same concerns as the corresponding patch in depends/patches/qt/rcc_hardcode_timestamp.patch. The previous review comment correctly identified that hardcoding the timestamp and removing SOURCE_DATE_EPOCH/QT_RCC_SOURCE_DATE_OVERRIDE support contradicts reproducible build best practices.

Both patches should be reconsidered in favor of:

  1. Setting SOURCE_DATE_EPOCH in the build environment
  2. Using --format-version 1 for rcc
  3. Preserving the environment variable support while controlling the value externally
contrib/rpm/README.md (1)

75-78: Update legacy Qt version reference from Qt4 to Qt5.

The documentation mentions Qt4 as the legacy alternative, but the PR migrates from Qt5 to Qt6. Lines 76-77 should reference Qt5 instead of Qt4 to accurately reflect the migration path and available build options.

Apply this diff to correct the documentation:

-The RPM spec file will by default build the GUI client linked against the Qt6
-libraries. If you wish instead to link against the Qt4 libraries you need to
-pass the switch `-D '_use_qt4 1'` at build time to the `rpmbuild` or `mock`
-command used to build the packages.
+The RPM spec file will by default build the GUI client linked against the Qt6
+libraries. If you wish instead to link against the Qt5 libraries you need to
+pass the switch `-D '_use_qt5 1'` at build time to the `rpmbuild` or `mock`
+command used to build the packages.
depends/Makefile (1)

50-50: C++20 requirement lacks justification and documentation—document rationale or revert to C++17.

Qt 6.7.3 officially requires only C++17, not C++20. Without documented C++20-specific features in the codebase or justification for this requirement, this change unnecessarily constrains compiler support. Either document why C++20 is required or revert to C++17 to align with Qt6's baseline requirement.

depends/funcs.mk (3)

75-79: Hardcoded patch path breaks custom patches; use $(1)_patches_path with sane default.

The recipe hash construction hardcodes patches under $(PATCHES_PATH)/$(1), which ignores package-specific $(1)_patches_path set by packages like qt.mk. This will cause wrong recipe hashes and potentially miss patches.

Apply this diff:

 define int_get_build_recipe_hash
+$(eval $(1)_patches_path?=$(PATCHES_PATH)/$(1))
-$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1))
+$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $($(1)_patches_path)/,$($(1)_patches)) | cut -d" " -f1))
 final_build_id_long+=:[$(1)_all_file_checksums]$(foreach checksum,$($(1)_all_file_checksums),$(shell echo ":$(checksum)")):
 $(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
 endef

83-91: _all_dependencies is never initialized but later used—restore dependency graph.

Lines 84-85 show the $(1)_all_dependencies initialization commented out, but line 86 uses $(1)_all_dependencies to compute $(1)_build_id_deps. This will cause build IDs to miss dependency information and prevent the configure step from unpacking dependencies.

Apply this diff to restore the dependency graph:

 $(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
-# $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($(1)_dependencies)))
-# $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
+$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
 $(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))

219-219: Investigate and correct PKG_CONFIG_SYSROOT_DIR setting for cross-compilation compatibility.

Setting PKG_CONFIG_SYSROOT_DIR=/ is inconsistent with the dynamic target-specific references used in the surrounding lines (217, 218, 220 all use $($($(1)_type)_prefix)). For cross-compilation, this will cause pkg-config to look in the host root instead of the target sysroot, potentially finding host libraries instead of target libraries.

Apply this diff:

 $(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
 $(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
-$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=/
+$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=$($($(1)_type)_prefix)
 $(1)_config_env+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake
src/qt/bitcoin.cpp (2)

497-502: Fix comment/timeout mismatch.

The comment states "500 milliseconds" but the code uses 1000ms. This inconsistency should be resolved.

Apply this diff to align comment with code:

-    // Delay shutdown signal by 500 milliseconds
+    // Delay shutdown signal by 1000 milliseconds
     QTimer::singleShot(1000, this, [this]() {

504-506: Null pointer risk in showCloseWindow().

The method unconditionally dereferences shutdownWindow without checking if it's null. If showCloseWindow() is called before requestShutdown() initializes shutdownWindow, this will crash.

Consider adding a null check:

 void BitcoinApplication::showCloseWindow(){
+    if (!shutdownWindow) {
+        return; // or initialize shutdownWindow here
+    }
     shutdownWindow->show();
 }
src/qt/guiutil.cpp (1)

100-100: Y2038 truncation risk persists.

The cast to qint32 still truncates timestamps beyond 2038. Qt6's fromSecsSinceEpoch accepts 64-bit values natively, so the cast should be removed.

Apply this diff:

-    return dateTimeStr(QDateTime::fromSecsSinceEpoch((qint32)nTime));
+    return dateTimeStr(QDateTime::fromSecsSinceEpoch(nTime));
doc/build-unix.md (2)

93-95: Qt version wording inconsistency.

Line 93 states "To build with Qt 5 (recommended)" but line 95 lists Qt 6 packages (qt6-qttools-devel, qt6-qtbase-devel). Update the heading to match.

Apply this diff:

-To build with Qt 5 (recommended) you need the following:
+To build with Qt 6 (recommended) you need the following:

266-268: Use portable parallelism command on FreeBSD.

nproc is not available by default on FreeBSD. Use sysctl -n hw.ncpu for portability.

Apply this diff:

-    cd depends && gmake -j$(nproc) && cd ..
+    cd depends && gmake -j$(sysctl -n hw.ncpu) && cd ..
     cmake -B build --toolchain depends/$(depends/config.guess)/toolchain.cmake
-    cmake --build build -j$(nproc) -- -j$(nproc)
+    cmake --build build -j$(sysctl -n hw.ncpu)
README.md (2)

133-176: Fix stray make -j$(nproc) and broken code block structure.

Lines 174-176 contain a stray make -j$(nproc) command after the prose, followed by closing backticks. This breaks the markdown code block structure.

Apply this diff:

 If the build succeeded, binaries will be generated in `build/bin/`: `firod`, `firo-cli`, and if GUI is enabled, `firo-qt`.
-make -j$(nproc)
-```
+```

112-112: Update Qt5 packages to Qt6 equivalents.

Past review identified this line still references Qt5 packages (qttools5-dev qttools5-dev-tools). These should be updated to Qt6 equivalents to match the Qt6 migration.

Apply this diff:

-sudo apt-get install qttools5-dev qttools5-dev-tools libxcb-xkb-dev bison
+sudo apt-get install qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libxcb-xkb-dev bison
depends/toolchain.cmake.in (2)

124-134: Remove unused PKG_CONFIG_ARGN assignment.

Past review identified that PKG_CONFIG_ARGN is never used by CMake's pkg_check_modules() and should be removed.

Apply this diff:

   set(ENV{PKG_CONFIG_PATH} ${pkg_config_path})
   set(ENV{PKG_CONFIG_LIBDIR} ${pkg_config_path})
   unset(pkg_config_path)
-  set(PKG_CONFIG_ARGN --static)
 endif()

166-172: Fix inconsistent pattern matching and redundant assignment.

Past review identified two issues: inconsistent STREQUAL "" instead of MATCHES pattern, and redundant wallet_packages re-assignment.

Apply this diff:

-set(wallet_packages @wallet_packages@)
 set(bdb_packages @bdb_packages@)
-if("${wallet_packages}" STREQUAL "" OR "${bdb_packages}" STREQUAL "")
+if("@wallet_packages@" MATCHES "^[ ]*$" OR "${bdb_packages}" MATCHES "^[ ]*$")
   set(WITH_BDB OFF CACHE BOOL "")
 else()
   set(WITH_BDB ON CACHE BOOL "")
 endif()
depends/packages/native_qt.mk (2)

103-110: Fix undefined variable in fetch command.

Past review identified that $(package)_download_file is undefined and breaks fetching.

Apply this diff:

-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \

155-158: Guard translations directory move against missing directory.

Past review identified that mv translations/ .. will fail if the directory doesn't exist.

Apply this diff:

   rm -rf doc/ && \
-  mv translations/ ..
+  if [ -d translations ]; then mv translations ..; fi
depends/packages/qt.mk (4)

55-55: C++17 configure option conflicts with C++20 feature flag.

Line 55 sets -c++std c++17 while line 197 enables -DQT_FEATURE_cxx20=ON. This inconsistency may break Qt feature checks.

Apply this diff:

-$(package)_config_opts += -c++std c++17
+$(package)_config_opts += -c++std c++20

101-102: Conflicting zlib options: both -system-zlib and -qt-zlib specified.

Past review identified that both zlib options are set, creating a conflict.

Apply this diff:

 $(package)_config_opts += -system-zlib
-$(package)_config_opts += -qt-zlib

138-141: Darwin config options are being overwritten.

Past review confirmed that line 163 uses := which resets the variable, removing -no-feature-corewlan that was added at line 140.

Consolidate Darwin options into a single block:

-$(package)_config_opts_darwin = -no-dbus
-$(package)_config_opts_darwin += -no-opengl
-$(package)_config_opts_darwin += -no-feature-corewlan
-$(package)_config_opts += -no-feature-vulkan
-
-# Core tools.
+# Core tools.
 $(package)_config_opts += -no-feature-androiddeployqt
 $(package)_config_opts += -no-feature-macdeployqt
 $(package)_config_opts += -no-feature-qmake
 $(package)_config_opts += -no-feature-windeployqt
+$(package)_config_opts += -no-feature-vulkan
 
 ifeq ($(host),$(build))
 # Qt Tools module.
 $(package)_config_opts += -feature-linguist
 $(package)_config_opts += -no-feature-assistant
 $(package)_config_opts += -no-feature-clang
 $(package)_config_opts += -no-feature-clangcpp
 $(package)_config_opts += -no-feature-designer
 $(package)_config_opts += -no-feature-pixeltool
 $(package)_config_opts += -no-feature-qdoc
 $(package)_config_opts += -no-feature-qtattributionsscanner
 $(package)_config_opts += -no-feature-qtdiag
 $(package)_config_opts += -no-feature-qtplugininfo
 endif
 
-$(package)_config_opts_darwin := -no-dbus
+$(package)_config_opts_darwin = -no-dbus
 $(package)_config_opts_darwin += -no-opengl
 $(package)_config_opts_darwin += -pch
 $(package)_config_opts_darwin += -no-feature-printsupport
 $(package)_config_opts_darwin += -no-freetype
 $(package)_config_opts_darwin += -no-pkg-config
+$(package)_config_opts_darwin += -no-feature-corewlan

Also applies to: 163-169


191-195: Darwin OBJC/OBJCXX environment variables are defined but never used.

Past review identified that $(package)_config_env_darwin is set but never applied during configure/build.

For Darwin builds, these compiler settings should be included in the environment.

Apply this diff:

 define $(package)_config_cmds
   cd qtbase && \
-  $($(package)_config_env) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
+  $($(package)_config_env) $(if $(filter darwin,$(host_os)),$($(package)_config_env_darwin)) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
 endef
 
 define $(package)_build_cmds
-  $($(package)_config_env) cmake --build . --parallel
+  $($(package)_config_env) $(if $(filter darwin,$(host_os)),$($(package)_config_env_darwin)) cmake --build . --parallel
 endef

Also applies to: 343-349

src/leveldb/util/env_windows.cc (1)

750-769: Guard against enqueuing after Shutdown; otherwise tasks may pile up with no worker

Schedule() should refuse new work once shutdown is requested. Without this, callers can enqueue jobs after the background thread exits (started_background_thread_ stays true), leaving items unprocessed.

 void WindowsEnv::Schedule(
     void (*background_work_function)(void* background_work_arg),
     void* background_work_arg) {
   background_work_mutex_.Lock();
+
+  // Reject new work after shutdown has been requested.
+  if (shutdown_requested_.load(std::memory_order_acquire)) {
+    background_work_mutex_.Unlock();
+    return;
+  }

   // Start the background thread, if we haven't done so already.
   if (!started_background_thread_) {
     started_background_thread_ = true;
     std::thread background_thread(WindowsEnv::BackgroundThreadEntryPoint, this);
     background_thread.detach();
   }

   // If the queue is empty, the background thread may be waiting for work.
   if (background_work_queue_.empty()) {
     background_work_cv_.Signal();
   }

   background_work_queue_.emplace(background_work_function, background_work_arg);
   background_work_mutex_.Unlock();
 }
depends/patches/qt/qtbase_skip_tools.patch (1)

16-18: Restore qt_internal_create_wrapper_scripts(); downstream configure breaks without it.

Removing qt_internal_create_wrapper_scripts() prevents generation of qt-cmake/qt-configure-module used by downstream Qt modules and other patches. Revert this deletion.

Apply this minimal fix to the patch file so wrapper scripts remain generated:

diff --git a/depends/patches/qt/qtbase_skip_tools.patch b/depends/patches/qt/qtbase_skip_tools.patch
--- a/depends/patches/qt/qtbase_skip_tools.patch
+++ b/depends/patches/qt/qtbase_skip_tools.patch
@@ -16,9 +16,0 @@
-# Depends on the global features being evaluated.
-qt_internal_create_wrapper_scripts()
-

Run to confirm no consumers are broken and the scripts are still referenced:

#!/bin/bash
set -euo pipefail
echo "Searching for wrapper script usage in repo..."
rg -n --type=cmake -C2 'qt-cmake|qt-configure-module' || true
echo "Searching in all files (patches/build scripts)..."
rg -n -C2 'qt-cmake|qt-configure-module|QtBaseGlobalTargets\.cmake|qt_internal_create_wrapper_scripts' || true

Based on past review comments.

🧹 Nitpick comments (10)
src/qt/sendcoinsentry.cpp (1)

88-88: LGTM! Correct Qt6 regex migration.

The migration from QRegExp to QRegularExpression is correct and the pattern [\\x00-\\x1F\\x7F] will behave identically in Qt6, properly removing control characters from the memo text.

For a minor performance improvement, consider declaring the regex as a function-level static to avoid recompiling it on every text change:

     } else {
         QString sanitized = text;
-        sanitized.remove(QRegularExpression("[\\x00-\\x1F\\x7F]"));
+        static const QRegularExpression controlChars("[\\x00-\\x1F\\x7F]");
+        sanitized.remove(controlChars);
         if (sanitized != text) {
depends/patches/qt/qtbase_avoid_native_float16.patch (1)

12-37: Consider the performance trade-off of disabling native float16 on all platforms.

This patch disables native float16 support across all platforms (including ARM with IEEE float16 and x86 with SSE2), not just those affected by the libgcc compatibility issue. While this ensures maximum compatibility, it forces software emulation even on platforms with hardware float16 support.

If this workaround is temporary (as the description suggests), this blanket approach is reasonable. However, if it will remain in place longer term, consider whether a more targeted approach would be beneficial.

src/crypto/MerkleTreeProof/blake2/blake2b.c (1)

1-11: Consider unifying the symbol renaming convention.

The macros use two different patterns: lines 1-7 add a firo_ prefix (e.g., firo_blake2b_state), while lines 8-11 add a _firo suffix (e.g., blake2b_firo). While both achieve the goal of symbol namespacing, this inconsistency may cause confusion for maintainers.

Consider standardizing on one pattern, preferably the prefix style for consistency:

-#define blake2b blake2b_firo
-#define blake2b_long blake2b_long_firo
-#define blake2b_4r_update blake2b_4r_update_firo
-#define blake2b_4r_final blake2b_4r_final_firo
+#define blake2b firo_blake2b
+#define blake2b_long firo_blake2b_long
+#define blake2b_4r_update firo_blake2b_4r_update
+#define blake2b_4r_final firo_blake2b_4r_final
depends/patches/native_qt/qtbase_avoid_native_float16.patch (1)

1-37: LGTM! Temporary workaround for libgcc compatibility.

This patch disables native float16 support to avoid compatibility issues with libgcc versions < 12.x, which is a documented GCC issue. The patch correctly forces Qt to use its fallback float16 implementation. As noted in the patch comments, this can be removed once the minimum libgcc version is updated to 12.x or newer.

Consider tracking this technical debt with a TODO comment or issue to remove the patch once libgcc 12.x becomes the minimum requirement.

depends/funcs.mk (2)

284-287: Remove or activate commented-out logging infrastructure.

The logging infrastructure on lines 284-287 is commented out. Either remove it if not needed or activate it if build logging is required. Commented-out infrastructure creates maintenance confusion.


366-371: Remove commented-out package file includes.

Lines 366-368 show commented-out package file includes that have been replaced by line 368. The commented lines should be removed to avoid confusion about which includes are actually active.

Apply this diff:

-# $(foreach native_package,$(native_packages),$(eval include packages/$(native_package).mk))
-# $(foreach package,$(packages),$(eval include packages/$(package).mk))
 $(foreach package,$(all_packages),$(eval include packages/$(package).mk))
src/qt/guiutil.cpp (1)

310-319: Good refactor: helper eliminates code duplication.

The new ExtractFirstSuffixFromFilter function consolidates duplicate regex-based suffix extraction logic from getSaveFileName and getOpenFileName, improving maintainability.

Also applies to: 342-342, 388-388

src/leveldb/util/env_windows.cc (3)

680-684: Pair shutdown flag with a release-store

Good addition. Use an explicit release-store to pair with acquire-loads in readers (e.g., Schedule) for clearer cross-thread publication.

-  void Shutdown() override {
-    shutdown_requested_ = true;
-    background_work_cv_.SignalAll();
-  }
+  void Shutdown() override {
+    shutdown_requested_.store(true, std::memory_order_release);
+    background_work_cv_.SignalAll();
+  }

777-780: Drain‑then‑exit logic is correct; relies on Schedule() guard

Exiting only when the queue is empty is fine. Ensure Schedule() rejects new items post‑shutdown, otherwise this loop might never observe an empty queue or, worse, the worker exits and items remain. Consider using acquire-load here for consistency, though the mutex already provides ordering.

-      if (shutdown_requested_) {
+      if (shutdown_requested_.load(std::memory_order_acquire)) {
         background_work_mutex_.Unlock();
         return;
       }

709-709: Atomic flag OK; add a brief comment on memory ordering intent

Keep std::atomic. Add a short comment indicating writers use release and readers use acquire (Schedule/background loop) to document intent and avoid regressions.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1f09751 and 73216db.

⛔ Files ignored due to path filters (1)
  • .github/workflows/ci-master.yml is excluded by !**/*.yml
📒 Files selected for processing (97)
  • CMakeLists.txt (1 hunks)
  • Dockerfile (1 hunks)
  • Makefile.am (0 hunks)
  • README.md (7 hunks)
  • autogen.sh (0 hunks)
  • build-aux/m4/ax_boost_base.m4 (0 hunks)
  • build-aux/m4/ax_boost_chrono.m4 (0 hunks)
  • build-aux/m4/ax_boost_filesystem.m4 (0 hunks)
  • build-aux/m4/ax_boost_program_options.m4 (0 hunks)
  • build-aux/m4/ax_boost_system.m4 (0 hunks)
  • build-aux/m4/ax_boost_thread.m4 (0 hunks)
  • build-aux/m4/ax_boost_unit_test_framework.m4 (0 hunks)
  • build-aux/m4/ax_check_compile_flag.m4 (0 hunks)
  • build-aux/m4/ax_check_link_flag.m4 (0 hunks)
  • build-aux/m4/ax_check_preproc_flag.m4 (0 hunks)
  • build-aux/m4/ax_cxx_compile_stdcxx.m4 (0 hunks)
  • build-aux/m4/ax_gcc_func_attribute.m4 (0 hunks)
  • build-aux/m4/ax_pthread.m4 (0 hunks)
  • build-aux/m4/ax_subdirs_configure.m4 (0 hunks)
  • build-aux/m4/bitcoin_find_bdb48.m4 (0 hunks)
  • build-aux/m4/bitcoin_qt.m4 (0 hunks)
  • build-aux/m4/bitcoin_subdir_to_include.m4 (0 hunks)
  • build-aux/m4/l_atomic.m4 (0 hunks)
  • cmake/module/FindQt.cmake (0 hunks)
  • configure.ac (0 hunks)
  • contrib/debian/changelog (1 hunks)
  • contrib/debian/rules (1 hunks)
  • contrib/guix/libexec/build.sh (1 hunks)
  • contrib/rpm/README.md (1 hunks)
  • contrib/rpm/bitcoin.spec (3 hunks)
  • depends/Makefile (3 hunks)
  • depends/config.site.in (1 hunks)
  • depends/funcs.mk (7 hunks)
  • depends/hosts/darwin.mk (1 hunks)
  • depends/packages/libxcb_util_cursor.mk (1 hunks)
  • depends/packages/native_qt.mk (1 hunks)
  • depends/packages/packages.mk (1 hunks)
  • depends/packages/qt.mk (2 hunks)
  • depends/packages/qt_details.mk (1 hunks)
  • depends/packages/zeromq.mk (1 hunks)
  • depends/patches/native_qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/native_qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/native_qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/native_qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/native_qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/patches/qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/qt/memory_resource.patch (0 hunks)
  • depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_qmain.patch (1 hunks)
  • depends/patches/qt/qtbase_platformsupport.patch (1 hunks)
  • depends/patches/qt/qtbase_plugins_cocoa.patch (1 hunks)
  • depends/patches/qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/toolchain.cmake.in (3 hunks)
  • doc/build-unix.md (5 hunks)
  • doc/man/Makefile.am (0 hunks)
  • libbitcoinconsensus.pc.in (0 hunks)
  • src/Makefile.am (0 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2.h (1 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2b.c (1 hunks)
  • src/init.cpp (2 hunks)
  • src/leveldb/include/leveldb/env.h (1 hunks)
  • src/leveldb/util/env.cc (1 hunks)
  • src/leveldb/util/env_posix.cc (3 hunks)
  • src/leveldb/util/env_windows.cc (3 hunks)
  • src/qt/CMakeLists.txt (8 hunks)
  • src/qt/bitcoin.cpp (4 hunks)
  • src/qt/bitcoinamountfield.cpp (1 hunks)
  • src/qt/bitcoingui.cpp (8 hunks)
  • src/qt/clientmodel.cpp (3 hunks)
  • src/qt/coincontroldialog.cpp (1 hunks)
  • src/qt/guiutil.cpp (5 hunks)
  • src/qt/notificator.cpp (3 hunks)
  • src/qt/recentrequeststablemodel.cpp (1 hunks)
  • src/qt/recentrequeststablemodel.h (1 hunks)
  • src/qt/rpcconsole.cpp (3 hunks)
  • src/qt/sendcoinsentry.cpp (2 hunks)
  • src/qt/splashscreen.cpp (1 hunks)
  • src/qt/test/CMakeLists.txt (1 hunks)
  • src/qt/transactionfilterproxy.cpp (1 hunks)
  • src/qt/transactiontablemodel.cpp (2 hunks)
  • src/qt/utilitydialog.cpp (2 hunks)
  • src/qt/winshutdownmonitor.cpp (1 hunks)
  • src/qt/winshutdownmonitor.h (1 hunks)
  • src/secp256k1/Makefile.am (0 hunks)
  • src/secp256k1/build-aux/m4/ax_jni_include_dir.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/bitcoin_secp.m4 (0 hunks)
  • src/secp256k1/build-aux/m4/m4_ax_cxx_compile_stdcxx.m4 (0 hunks)
  • src/secp256k1/configure.ac (0 hunks)
  • src/univalue/Makefile.am (0 hunks)
  • src/univalue/autogen.sh (0 hunks)
  • src/univalue/build-aux/m4/.gitignore (0 hunks)
  • src/univalue/configure.ac (0 hunks)
💤 Files with no reviewable changes (36)
  • src/univalue/build-aux/m4/.gitignore
  • autogen.sh
  • build-aux/m4/ax_check_compile_flag.m4
  • src/univalue/configure.ac
  • build-aux/m4/ax_boost_thread.m4
  • src/secp256k1/Makefile.am
  • src/Makefile.am
  • src/secp256k1/build-aux/m4/ax_jni_include_dir.m4
  • build-aux/m4/l_atomic.m4
  • src/secp256k1/build-aux/m4/bitcoin_secp.m4
  • build-aux/m4/ax_boost_unit_test_framework.m4
  • build-aux/m4/ax_boost_chrono.m4
  • doc/man/Makefile.am
  • depends/patches/qt/memory_resource.patch
  • build-aux/m4/bitcoin_qt.m4
  • configure.ac
  • build-aux/m4/ax_boost_system.m4
  • build-aux/m4/bitcoin_subdir_to_include.m4
  • build-aux/m4/ax_boost_filesystem.m4
  • build-aux/m4/ax_cxx_compile_stdcxx.m4
  • build-aux/m4/ax_check_preproc_flag.m4
  • libbitcoinconsensus.pc.in
  • src/univalue/Makefile.am
  • src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4
  • src/univalue/autogen.sh
  • src/secp256k1/build-aux/m4/m4_ax_cxx_compile_stdcxx.m4
  • build-aux/m4/ax_subdirs_configure.m4
  • build-aux/m4/bitcoin_find_bdb48.m4
  • build-aux/m4/ax_pthread.m4
  • build-aux/m4/ax_check_link_flag.m4
  • build-aux/m4/ax_boost_base.m4
  • src/secp256k1/configure.ac
  • build-aux/m4/ax_gcc_func_attribute.m4
  • build-aux/m4/ax_boost_program_options.m4
  • cmake/module/FindQt.cmake
  • Makefile.am
🚧 Files skipped from review as they are similar to previous changes (21)
  • src/qt/bitcoinamountfield.cpp
  • CMakeLists.txt
  • src/init.cpp
  • src/qt/transactiontablemodel.cpp
  • depends/patches/native_qt/qtbase_skip_tools.patch
  • depends/patches/native_qt/qttools_skip_dependencies.patch
  • src/qt/utilitydialog.cpp
  • depends/hosts/darwin.mk
  • src/qt/CMakeLists.txt
  • src/leveldb/util/env_posix.cc
  • depends/packages/packages.mk
  • depends/patches/qt/qtbase_plugins_cocoa.patch
  • contrib/debian/rules
  • depends/patches/qt/qtbase_avoid_qmain.patch
  • src/qt/winshutdownmonitor.cpp
  • src/leveldb/include/leveldb/env.h
  • src/leveldb/util/env.cc
  • src/qt/test/CMakeLists.txt
  • depends/packages/qt_details.mk
  • src/crypto/MerkleTreeProof/blake2/blake2.h
  • depends/patches/qt/qtbase_platformsupport.patch
🧰 Additional context used
🧬 Code graph analysis (3)
src/leveldb/util/env_windows.cc (1)
src/leveldb/util/env_posix.cc (1)
  • shutdown_requested_ (732-735)
src/qt/clientmodel.cpp (1)
src/chainparams.cpp (4)
  • Params (1348-1351)
  • Params (1348-1348)
  • Params (1353-1365)
  • Params (1353-1353)
src/qt/winshutdownmonitor.h (1)
src/qt/winshutdownmonitor.cpp (2)
  • nativeEventFilter (19-54)
  • nativeEventFilter (19-19)
🪛 markdownlint-cli2 (0.18.1)
README.md

122-122: Heading style
Expected: setext; Actual: atx

(MD003, heading-style)


148-148: Bare URL used

(MD034, no-bare-urls)


150-150: Heading style
Expected: setext; Actual: atx

(MD003, heading-style)


156-156: Heading style
Expected: setext; Actual: atx

(MD003, heading-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: build-guix-arm64-apple-darwin
  • GitHub Check: build-guix-x86_64-apple-darwin
  • GitHub Check: build-guix-aarch64-linux-gnu
  • GitHub Check: build-guix-x86_64-w64-mingw32
  • GitHub Check: build-guix-x86_64-linux-gnu
  • GitHub Check: build-mac-cmake
  • GitHub Check: build-linux-cmake
  • GitHub Check: build-windows-cmake
  • GitHub Check: build
🔇 Additional comments (42)
src/qt/winshutdownmonitor.h (1)

21-21: LGTM! Correct Qt 6 API alignment.

The parameter type change from long * to qintptr * correctly aligns with Qt 6's QAbstractNativeEventFilter::nativeEventFilter signature and matches the implementation in winshutdownmonitor.cpp.

src/qt/notificator.cpp (3)

30-55: LGTM! Well-structured DBus image type.

The FreedesktopImage class definition follows Qt DBus conventions correctly, with appropriate friend operators for marshalling and the Q_DECLARE_METATYPE declaration.


82-84: LGTM! Proper metatype registration.

The metatype is correctly registered before use when the DBus interface is valid.


154-158: LGTM! Correct Qt6 QVariant usage.

Using QVariant::fromValue() is the proper Qt6 approach for creating variants from custom types.

depends/patches/qt/qttools_skip_dependencies.patch (2)

19-36: LGTM! Linguist tool reduction is appropriate for minimal builds.

The patch appropriately removes Qt linguist subdirectories that are unnecessary for a CMake-based build:

  • Removes .pro file tools (lprodump, lrelease-pro, lupdate-pro) since the project uses CMake
  • Removes the GUI linguist tool to reduce dependencies
  • Retains essential command-line tools (lconvert, lrelease, lupdate) and the Linguist module

This aligns well with the PR's goal of streamlining Qt 6 dependencies.


7-18: Verification confirms the patch correctly handles the optional dependency.

The search results show that the if(TARGET WrapLibClang::WrapLibClang) conditional on line 17 properly guards against the missing target when qt_find_package is commented out. This is the correct CMake pattern for optional dependencies—the condition evaluates to false when the target doesn't exist, and the code block is safely skipped. No unguarded usages of WrapLibClang were found elsewhere in the depends directory, confirming the patch follows best practices and will not cause build failures.

src/qt/sendcoinsentry.cpp (1)

19-21: LGTM! Correct Qt6 include addition.

The QRegularExpression header is properly included, which is required for Qt6 as this class is now in a separate header. The formatting with blank lines is acceptable.

src/qt/rpcconsole.cpp (1)

499-506: LGTM! Event forwarding updated correctly for Qt6.

The new QKeyEvent construction properly mirrors the original event's properties (type, key, modifiers, text, autoRepeat, count) and uses the correct Qt6 constructor signature. Qt's event system will take ownership of the posted events, so memory management is correct.

Also applies to: 514-521, 534-541

depends/patches/qt/qtbase_avoid_native_float16.patch (1)

1-10: The patch is correctly applied and necessary for current minimum platform requirements.

The patch is actively applied in both depends/packages/native_qt.mk and depends/packages/qt.mk to disable native float16 types in Qt 6.

The workaround remains necessary: the project's minimum supported platform is Ubuntu 18.04 LTS, which ships with GCC 7 (libgcc 7). Even Ubuntu 22.04 LTS includes GCC 11—well below the GCC 12.x threshold mentioned in the patch description. The patch can only be dropped once the minimum GCC requirement is raised to 12.x or newer.

The approach is sound: it trades native float16 performance for broad compatibility across the supported platform range. No changes needed.

src/crypto/MerkleTreeProof/blake2/blake2b.c (1)

1-11: Symbol renaming is consistent; no action required.

The verification confirms that blake2.h contains identical macros to those shown in the review, and all files that include it (core.c, merkle-tree.cpp, ref.c, ref.h, mtp.cpp) automatically receive these preprocessor macros. The "unprefixed symbols" found in the source files are renamed at compile time through the macro definitions, preventing any linker conflicts.

depends/config.site.in (1)

65-67: LGTM! Qt6 debug flag update is correct.

The update from qt5_debug to qt6_debug is consistent with the Qt6 migration and correctly maintains the conditional logic for debug builds with GUI enabled.

depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (1)

1-17: LGTM! Proper workaround for GCC visibility macro issue.

The patch correctly addresses the moc preprocessor issue with GCC's internal _GLIBCXX_VISIBILITY macro by adding it to the ignored macro list, following the same pattern as __attribute__ and __declspec__. This aligns with the upstream Qt bug report (QTBUG-83160).

src/qt/coincontroldialog.cpp (1)

681-681: LGTM! Correct Qt6 tristate flag update.

The change from Qt::ItemIsTristate to Qt::ItemIsUserTristate is the correct Qt6 migration path. Qt6 deprecated ItemIsTristate in favor of ItemIsUserTristate, which provides more explicit control over tristate checkbox behavior while maintaining the same functionality for user-driven partial check states in tree hierarchies.

depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch (1)

1-17: LGTM! Native Qt tooling requires the same moc fix.

This patch applies the same _GLIBCXX_VISIBILITY workaround to the native Qt build (used for build-time tools). Both the target Qt and native Qt patches are necessary to ensure moc works correctly across the build pipeline.

depends/patches/qt/dont_hardcode_pwd.patch (1)

1-51: LGTM! Improved portability for non-FHS systems.

Replacing hardcoded /bin/pwd with pwd improves portability for systems that don't follow the Filesystem Hierarchy Standard (e.g., Guix). The pwd command will be found through the normal PATH mechanism, which is the standard practice for portable shell scripts. The patch references an upstream Qt commit, indicating this approach is validated.

depends/patches/native_qt/dont_hardcode_pwd.patch (1)

1-51: LGTM! Portability improvement for non-FHS systems.

The patch correctly replaces hardcoded /bin/pwd with pwd to allow path resolution via the standard PATH mechanism. This is essential for systems like Guix that don't follow the Filesystem Hierarchy Standard. The changes are consistent across all three affected scripts and align with the upstream Qt commit referenced.

contrib/rpm/bitcoin.spec (1)

12-12: LGTM! Qt5→Qt6 migration properly reflected in RPM packaging.

The spec file correctly updates the build arguments and dependencies from Qt5 to Qt6. The package names (qt6-qtbase-devel, qt6-linguist) are appropriate for RPM-based distributions, and the changelog properly documents the change.

Also applies to: 70-72, 432-433

contrib/guix/libexec/build.sh (2)

368-378: LGTM! Expanded Darwin environment cleanup to prevent toolchain conflicts.

The expanded unset of CC, CXX, and CPP environment variables for Darwin builds correctly prevents GCC header conflicts. The change appropriately applies to all Darwin hosts rather than being limited to specific architectures, and the comment clearly explains the rationale.


383-383: LGTM! LDFLAGS addition completes Darwin build environment configuration.

Adding LDFLAGS to the environment invocation alongside the existing PKG_CONFIG_PATH, CFLAGS, CXXFLAGS, and OBJCXXFLAGS properly completes the Darwin build environment configuration for the CMake toolchain.

depends/Makefile (2)

172-172: LGTM! Qt native packages correctly integrated into build graph.

The addition of $(qt_native_packages_) to the native_packages list properly integrates Qt6 native tooling (like moc, rcc, uic) into the dependency build graph, which is essential for the Qt6 migration and CMake-based build workflow.


275-275: LGTM! Install target correctly migrated to CMake-only workflow.

Removing the config.site dependency from the install target is appropriate for the migration from autotools to CMake. The toolchain is now solely defined by toolchain.cmake, simplifying the build configuration.

depends/packages/libxcb_util_cursor.mk (1)

1-31: LGTM! Complete and correctly structured package definition.

The libxcb_util_cursor package definition follows the standard depends package pattern with a complete build lifecycle. The static library configuration, dependencies on other xcb utilities, and removal of libtool archives in postprocessing are all appropriate. This package is required for Qt6 X11 support on Linux.

src/qt/recentrequeststablemodel.cpp (1)

245-245: LGTM! Correct Qt6 migration for date comparison.

The change from toTime_t() to toSecsSinceEpoch() is correct for Qt6 compatibility. The toTime_t() method was deprecated in Qt 5.8 and removed in Qt6. Both methods return seconds since the Unix epoch, so the comparison behavior is preserved while maintaining Qt6 compatibility.

src/qt/recentrequeststablemodel.h (1)

31-31: LGTM! Qt6 time API migration is correct.

The migration from deprecated toTime_t()/fromTime_t() to toSecsSinceEpoch()/fromSecsSinceEpoch() is consistent with Qt6 requirements. The added braces around the read-path reconstruction improve code clarity.

Also applies to: 38-40

src/qt/transactionfilterproxy.cpp (1)

15-17: LGTM! Consistent Qt6 time API migration.

The replacement of fromTime_t() with fromSecsSinceEpoch() is correct and maintains the same min/max date range semantics.

src/qt/clientmodel.cpp (1)

167-167: LGTM! Comprehensive Qt6 time API migration.

All four replacements of fromTime_t() with fromSecsSinceEpoch() are correct and cover block times, genesis time, client startup time, and tip updates consistently.

Also applies to: 171-171, 289-289, 375-375

Dockerfile (1)

28-31: LGTM! CMake migration is correct.

The replacement of the autotools build sequence with CMake commands (cmake -B build, cmake --build, cmake --install) aligns with the project-wide migration to CMake.

src/qt/bitcoingui.cpp (3)

314-314: LGTM! Shortcut normalization improves cross-platform consistency.

Replacing numeric modifier combinations with string-based Alt+%1 format normalizes shortcut definitions across platforms and simplifies the sequential key assignment pattern.

Also applies to: 321-321, 332-332, 343-343, 351-351, 362-364


389-389: Good practice: Using bitwise OR for flag combinations.

Changing from + to | operator for combining Qt keyboard modifiers is the canonical Qt approach for flag combinations and improves code clarity.

Also applies to: 462-463


554-554: LGTM! Qt6 time API migration.

Consistent with the broader Qt6 migration, replacing fromTime_t() with fromSecsSinceEpoch().

README.md (1)

121-124: LGTM: Fedora Qt6 packages updated correctly.

The Fedora/Redhat instructions have been properly updated to include cmake and Qt6 packages.

depends/toolchain.cmake.in (3)

17-19: LGTM: Cross-compiler target configuration.

The explicit CMAKE_*_COMPILER_TARGET settings correctly enable proper cross-compilation by informing the compiler of the target triplet.


103-113: LGTM: CMAKE_FIND_ROOT_PATH and Qt translations configuration.

The CMAKE_FIND_ROOT_PATH simplification and QT_TRANSLATIONS_DIR derivation correctly align with the CMake-based Qt6 workflow. The CMAKE_PREFIX_PATH guard prevents duplicate additions.


141-145: LGTM: Qt6 configuration with proper gating.

The Qt6_ROOT is correctly set when BUILD_GUI is enabled, aligning with the Qt6 migration.

depends/packages/native_qt.mk (2)

1-46: LGTM: Native Qt package metadata configuration.

The package metadata is properly derived from qt_details.mk, including version, download paths, hashes, patches, and extra sources. The versioned top-level CMake artifacts are correctly declared.


112-131: LGTM: Extract commands properly verify and extract Qt components.

The hash verification and extraction of qtbase, qttranslations, qttools, and top-level CMake files are correctly implemented.

depends/packages/qt.mk (3)

1-46: LGTM: Qt package metadata configuration.

The package metadata correctly derives all values from qt_details.mk, including version, download paths, hashes, dependencies, patches, and extra sources. The top-level CMake artifacts are properly declared with versioned filenames.


285-327: LGTM: Extract commands properly handle host vs cross-compile scenarios.

The conditional extraction correctly handles the full Qt build (host==build) with translations/tools versus the minimal cross-compile build (host!=build) with only qtbase.


339-357: LGTM: CMake-based build workflow.

The preprocessor, configure, build, stage, and postprocess commands correctly implement the Qt6 CMake-based build system. The conditional qttools patch application for host builds is appropriate.

depends/patches/qt/qtbase_skip_tools.patch (3)

30-38: Verified: no internal consumers of dropped CI support files.

The search confirms these files (qt-testrunner.py, sanitizer-testrunner.py, ensure_pro_file.cmake) are referenced only within the patch files themselves and nowhere else in the codebase. Safe to omit from depends builds.


46-48: Verification confirms these tools are correctly skipped.

The patch intentionally removes these tools as documented in the patch header (line 5), and no references to tracepointgen or tracegen exist elsewhere in the codebase. Downstream modules do not invoke these generators, confirming the skip is safe.


57-58: Verified: qlalr/qvkgen can be safely skipped.

These are internal qtbase tools for parser and Vulkan header generation. Search of the codebase confirms no downstream modules (qtbase, qttools, qttranslations, etc.) depend on them. The patch correctly removes these build targets from qtbase/src/tools/CMakeLists.txt.

* Backport updated bitcoin-qt.desktop from upstream master
* Add zmq dependency
* Switch to Qt5 (breaks precise, but that was already broken by C++11)
* Switch to Qt6 (breaks precise, but that was already broken by C++11)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Do not modify historical changelog entries; add a new entry instead.

This line modifies a changelog entry from October 2016, changing it from "Switch to Qt5" to "Switch to Qt6". This is historically inaccurate—Qt6 was not released until December 2020. Historical changelog entries should remain unchanged to preserve an accurate record of the project's evolution.

The correct approach is to:

  1. Revert this line to its original text: "Switch to Qt5"
  2. Add a new changelog entry at the top of the file documenting the current Qt6 migration with the appropriate version, date, and author information

Apply this diff to restore historical accuracy:

-  * Switch to Qt6 (breaks precise, but that was already broken by C++11)
+  * Switch to Qt5 (breaks precise, but that was already broken by C++11)

Then add a new entry at the top of the file (before line 1) for the current Qt6 migration.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* Switch to Qt6 (breaks precise, but that was already broken by C++11)
* Switch to Qt5 (breaks precise, but that was already broken by C++11)
🤖 Prompt for AI Agents
contrib/debian/changelog lines 48-48: restore the historical line to its
original text "Switch to Qt5" (undo the change to "Switch to Qt6") and add a new
changelog entry at the very top of the file (before line 1) documenting the
current Qt6 migration with the correct new version, current date, and author;
ensure the new entry follows the existing changelog format (version header,
date, urgency, and bullet points) so history remains accurate and the migration
is recorded as a new, topmost entry.

Comment on lines +45 to +73
# # Shell script to create a source tarball in $(1)_source from local directory
# # $(1)_local_dir instead of downloading remote sources. Tarball is recreated if
# # any paths in the local directory have a newer mtime, and checksum of the
# # tarball is saved to $(1)_fetched and returned as output.
# define fetch_local_dir_sha256
# if ! [ -f $($(1)_source) ] || [ -n "$$(find $($(1)_local_dir) -newer $($(1)_source) | head -n1)" ]; then \
# mkdir -p $(dir $($(1)_source)) && \
# $(build_TAR) -c -f $($(1)_source) -C $($(1)_local_dir) . && \
# rm -f $($(1)_fetched); \
# fi && \
# if ! [ -f $($(1)_fetched) ] || [ -n "$$(find $($(1)_source) -newer $($(1)_fetched))" ]; then \
# mkdir -p $(dir $($(1)_fetched)) && \
# cd $($(1)_source_dir) && \
# $(build_SHA256SUM) $($(1)_all_sources) > $($(1)_fetched); \
# fi && \
# cut -d" " -f1 $($(1)_fetched)
# endef

# define int_get_build_recipe_hash
# $(eval $(1)_patches_path?=$(PATCHES_PATH)/$(1))
# $(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $($(1)_patches_path)/,$($(1)_patches)) | cut -d" " -f1))
# # If $(1)_local_dir is set, create a tarball of the local directory contents to
# # use as the source of the package, and include a hash of the tarball in the
# # package id, so if directory contents change, the package and packages
# # depending on it will be rebuilt.
# $(if $($(1)_local_dir),$(eval $(1)_sha256_hash:=$(shell $(call fetch_local_dir_sha256,$(1)))))
# $(if $($(1)_local_dir),$(eval $(1)_all_file_checksums+=$($(1)_sha256_hash)))
# $(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
# endef
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Remove or activate extensive commented-out code.

Lines 45-73 contain a complete implementation of fetch_local_dir_sha256 and an enhanced int_get_build_recipe_hash that are commented out. This commented-out code should either be removed if it's no longer needed or activated if it's required for the build system. Leaving large blocks of commented code creates confusion about what the actual build behavior is.

🤖 Prompt for AI Agents
In depends/funcs.mk around lines 45 to 73 there is a large block that implements
fetch_local_dir_sha256 and an enhanced int_get_build_recipe_hash but it is
entirely commented out; either remove this dead code or restore it to active
code depending on whether the functionality is needed. If the logic is required
for local-dir source handling, uncomment the block, ensure indentation and
makefile syntax remain correct, verify referenced variables (e.g. $(build_TAR),
$(build_SHA256SUM), $(PATCHES_PATH), $(meta_depends)) are defined, and run a
quick build to confirm behavior; otherwise delete the commented block and add a
brief single-line comment explaining why it was removed to avoid confusion.

Comment on lines 276 to 283
define $(package)_fetch_cmds
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash))
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_top_download_path),$($(package)_top_cmakelists_download_file),$($(package)_top_cmakelists_file_name)-$($(package)_version),$($(package)_top_cmakelists_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_ecmoptionaladdsubdirectory_download_file),$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version),$($(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_qttoplevelhelpers_download_file),$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version),$($(package)_top_cmake_qttoplevelhelpers_sha256_hash))
endef
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify fetch_file fix for undefined variable.

Past review marked this as addressed (commits 03f54ed to 1f09751), but the code annotation shows line 277 still exists. Verify the fix was applied correctly.

Run this script to confirm the fetch command uses the correct variable:


🏁 Script executed:

#!/bin/bash
# Check the fetch_file call on line 277
sed -n '277p' depends/packages/qt.mk | grep -o '\$(package)_download_file\|\$(package)_file_name'

Length of output: 45


I need to gather more context to complete the verification. Let me check the fetch_file function definition and examine whether the variables are properly defined.


---

🏁 Script executed:

```shell
#!/bin/bash
# Find fetch_file function definition
rg -n 'fetch_file\s*\(' depends/packages/qt.mk -A 10 | head -20

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Check for _download_file variable definitions in qt.mk
rg -n '_download_file\s*=' depends/packages/qt.mk

Length of output: 327


🏁 Script executed:

#!/bin/bash
# Check context around line 277 more broadly
sed -n '270,285p' depends/packages/qt.mk

Length of output: 1564


🏁 Script executed:

#!/bin/bash
# Search for common pattern in other .mk files to understand the fetch_file signature
fd -e mk depends/packages/ -exec grep -l 'fetch_file' {} \; | head -5

Length of output: 245


Let me search for the fetch_file function definition and the missing variable definition:


---

🏁 Script executed:

```shell
#!/bin/bash
# Search for fetch_file function definition in depends/packages
fd -name '*.mk' depends/packages/ -exec grep -l 'define.*fetch_file' {} \;

Length of output: 230


🏁 Script executed:

#!/bin/bash
# Search for $(package)_download_file variable definition globally
rg -n '\$\(package\)_download_file\s*=' depends/

Length of output: 84


🏁 Script executed:

#!/bin/bash
# Check if fetch_file is defined in common.mk
rg -n 'fetch_file' depends/packages/common.mk -B 2 -A 10 | head -40

Length of output: 66


🏁 Script executed:

#!/bin/bash
# Check git log for the mentioned commits (if git history available)
git log --oneline 03f54ed..1f09751 2>/dev/null | head -10

Length of output: 0


Let me check qt.mk's variable definitions at the top and search more broadly for fetch_file:


---

🏁 Script executed:

```shell
#!/bin/bash
# Show top of qt.mk to see all variable definitions
head -100 depends/packages/qt.mk | grep -E '^\$\(package\)_'

Length of output: 4759


🏁 Script executed:

#!/bin/bash
# Search all .mk files for fetch_file definition
rg -n 'define.*fetch_file' depends/ -A 15

Length of output: 1755


🏁 Script executed:

#!/bin/bash
# Check if qt.mk defines _download_file anywhere (full file scan)
rg -n 'download_file' depends/packages/qt.mk

Length of output: 1232


🏁 Script executed:

#!/bin/bash
# Look for where fetch_file might be imported or called from
rg -n 'fetch_file' depends/ --type=mk | head -20

Length of output: 0


Line 277 contains an undefined variable that was not properly fixed.

Line 277 uses $($(package)_download_file) as the 3rd parameter to fetch_file, but this variable is never defined in qt.mk. The function signature shows this parameter should be the remote filename to fetch.

Comparing with lines 278-279 (which use $($(package)_qttranslations_file_name) twice for both remote and local filenames), line 277 should likely use $($(package)_file_name) for both the download file and local file name parameters—matching the pattern where remote and local filenames are identical.

The fix requires changing line 277's 3rd parameter from $($(package)_download_file) to $($(package)_file_name), or defining $(package)_download_file in qt.mk.

🤖 Prompt for AI Agents
In depends/packages/qt.mk around lines 276 to 283, the third parameter on line
277 uses an undefined variable $($(package)_download_file); replace that
parameter with $($(package)_file_name) so the remote and local filenames match
(or alternatively define $(package)_download_file earlier), ensuring the
fetch_file call uses the correct, defined filename variable.

Comment on lines +1 to +9
Skip building/installing unneeded tools:

1. Wrapper CMake scripts.
2. CI support files.
3. tracepointgen and tracegen tools.
4. Qt Look Ahead LR Parser Generator (qlalr).
5. Qt Vulkan Header Generator (qvkgen).


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

The note misclassifies wrapper scripts as “unneeded.”

Wrapper scripts are required by downstream Qt modules; please update this summary to exclude “Wrapper CMake scripts” from the skipped list.

🤖 Prompt for AI Agents
In depends/patches/qt/qtbase_skip_tools.patch around lines 1 to 9, the patch
summary incorrectly lists "Wrapper CMake scripts" as skipped even though
downstream Qt modules require them; update the summary text to remove the
"Wrapper CMake scripts" entry (and renumber the list items if you keep numbered
bullets) so the patch only claims to skip CI support files,
tracepointgen/tracegen, qlalr, and qvkgen.

@@ -0,0 +1,36 @@
QtTools: Skip unnecessary dependencies:

1. The LLVM installatiion.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix typo in patch description.

"installatiion" should be "installation".

-1. The LLVM installatiion.
+1. The LLVM installation.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
1. The LLVM installatiion.
1. The LLVM installation.
🤖 Prompt for AI Agents
In depends/patches/qt/qttools_skip_dependencies.patch around lines 3 to 3, fix
the typo in the patch description by changing "installatiion" to "installation"
so the description reads correctly; update the patch file text accordingly.

Comment on lines +1157 to +1160
// Get currently selected peer address
int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(id);
if(detailNodeRow < 0)
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove or revise the duplicate comment.

Line 1157 repeats the comment from line 1154, but the code at line 1158 retrieves the detail node row, not the peer address. Consider removing this comment or clarifying what's happening here (e.g., "Find the row for this node" or "Retrieve node details").

Apply this diff:

-        // Get currently selected peer address
         int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(id);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Get currently selected peer address
int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(id);
if(detailNodeRow < 0)
return;
int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(id);
if(detailNodeRow < 0)
return;
🤖 Prompt for AI Agents
In src/qt/rpcconsole.cpp around lines 1157 to 1160, the comment "Get currently
selected peer address" is a duplicate and misleading because the code is calling
getRowByNodeId(id) to find the node's row; remove or replace that comment with a
concise, accurate one such as "Find the row for this node" or "Retrieve node
details (row)"; do not change the code logic, only update or remove the comment
to reflect the actual action.

    Add required new build files
    Update some qt patch files
    Update makefile and packages
    Update qt makefile
    Fix x86_64-linux-gnu, aarch64-linux-gnu and x86_64-w64-mingw32
    Fix not recognizing compiler problem
    Test for cross compilation on CI
    Reafctor: deprecated QRegExp  -> QRegularExpression
    Refactor: replace the function in QDataTime to compatible with Qt6:
    - Add qtcompat header file to better maintainability
    - Replace deprecated QDateTime::fromTime_t() with fromSecsSinceEpoch()
    - Replace deprecated QDateTime::toTime_t() with toSecsSinceEpoch()
    - Add QT_DATETIME_FROM_TIME_T() and QT_DATETIME_TO_TIME_T() macros
    Refactor: update key combination handling for Qt 6 compatibility
    Refactor: deprecated QDesktopWidget -> QScreen
    Refactor: add Qt::ItemFlag compatibility for Qt 6
    Refactor: remove Qt compatibility layer and update to Qt 6 APIs
    Refactor:  rename the functions and structure to avoid the conflict (Qt6+ use blake2 withing itself)
    Refactor: replace copy constructor with constructor (copy constructor is protected in Qt6)
    Add translation file generation and dependencies for firoqt
    Refactor: add some include header and some minor changes
    Remove skiping rpath in cmake
    Refactor: change parameter type from long to qintptr in nativeEventFilter method
    Add patch file for native_qt to resolve native f16 issue on apple targets
    Refactor: enhance the toolchain file (according to Bitcoin toolchain)
    Fix a definition of env in zeromq.mk
    Update the funcs to be like Bitcoin
    Pass pkg_config_path in CI + install binutils for windows target
    Add some flags for cross-compiling for apple targets
    Pass pkg_config_path and unset some env variables for apple targets in build.sh
    Update qt.mk:
    . Pass the compilers and flags as basic flags.
    . Pass windres for mingw target.
@aleflm aleflm force-pushed the dev-aleflm-update-qt6-rebased branch from 73216db to 4d8cbbb Compare November 19, 2025 17:02
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/leveldb/util/env_posix.cc (1)

800-819: Schedule() should guard against enqueuing work after Shutdown().

After Shutdown() is called, the background thread exits but started_background_thread_ remains true. Subsequent calls to Schedule() will enqueue work items that will never be processed, leading to a resource leak and potential callback starvation. This mirrors the issue flagged in the Windows implementation.

Add a shutdown guard in Schedule() to reject new work after shutdown:

 void PosixEnv::Schedule(
     void (*background_work_function)(void* background_work_arg),
     void* background_work_arg) {
   background_work_mutex_.Lock();
+
+  // Do not accept new work after shutdown has been requested.
+  if (shutdown_requested_.load(std::memory_order_acquire)) {
+    background_work_mutex_.Unlock();
+    return;
+  }

   // Start the background thread, if we haven't done so already.
   if (!started_background_thread_) {
depends/funcs.mk (1)

107-157: Remove large block of commented-out code.

Lines 107-157 contain 51 lines of commented-out code including build log paths, filename helpers, and alternate default command implementations. This dead code should be removed to improve maintainability and clarity.

♻️ Duplicate comments (29)
contrib/debian/changelog (1)

48-48: This issue was already flagged: do not modify historical changelog entries.

As previously noted, this line modifies a 2016 changelog entry to say "Switch to Qt6"—which is historically inaccurate since Qt6 wasn't released until December 2020. Debian changelog files must preserve historical accuracy.

You must:

  1. Revert line 48 to its original text: * Switch to Qt5 (breaks precise, but that was already broken by C++11)
  2. Add a new changelog entry at the top of the file (before line 1) documenting the current Qt6 migration with the proper version, current date, and author
depends/hosts/darwin.mk (1)

70-70: Remove duplicate -platform_version from line 70.

Line 65 already sets the -Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) flag in darwin_LDFLAGS. Line 70 appends it again, causing linker warnings.

Apply this diff:

-darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) -Wl,-no_adhoc_codesign -fuse-ld=lld
+darwin_LDFLAGS += -Wl,-syslibroot,$(OSX_SDK) -Wl,-no_adhoc_codesign -fuse-ld=lld
depends/packages/zeromq.mk (1)

17-17: Critical: Fix makefile variable syntax to properly capture shell environment variable.

The syntax "$(LIBRARY_PATH)" attempts Make variable expansion, but LIBRARY_PATH is a shell environment variable, not a Make variable. This causes LIB_LIBRARY_BACKUP to be set to an empty string instead of capturing the actual environment value, breaking the backup mechanism for Darwin x86_64 builds in GUIX environments.

Apply this diff to use proper shell variable expansion:

-$(package)_config_env_x86_64_darwin = LIB_LIBRARY_BACKUP="$(LIBRARY_PATH)" LIBRARY_PATH=""
+$(package)_config_env_x86_64_darwin = LIB_LIBRARY_BACKUP="$$LIBRARY_PATH" LIBRARY_PATH=""

The double dollar sign $$ escapes the expansion so the shell receives $LIBRARY_PATH, consistent with patterns used elsewhere in the build system (e.g., native_qt.mk uses CC="$$(build_CC)").

src/leveldb/util/env_windows.cc (1)

680-684: Shutdown implementation looks correct.

The Shutdown() override properly sets the shutdown flag and signals the background thread to wake up and check the flag. However, the past review comment regarding Schedule() not guarding against post-shutdown work enqueuing remains a valid concern.

src/leveldb/include/leveldb/env.h (1)

191-192: EnvWrapper missing Shutdown() forwarding.

The new Shutdown() method is not forwarded in the EnvWrapper class (lines 318-386), which breaks its contract of forwarding all Env methods to the underlying target. This was already flagged in a previous review.

Based on the previous review, add Shutdown() forwarding to EnvWrapper after line 382:

  void Shutdown() override {
    target_->Shutdown();
  }
depends/funcs.mk (5)

45-73: Remove or activate extensive commented-out code.

This large commented-out block (29 lines) includes implementations of fetch_local_dir_sha256 and an enhanced int_get_build_recipe_hash with support for local directories and custom patch paths. The commented version is more sophisticated than the active implementation at lines 75-79. This creates confusion about the actual build behavior and makes maintenance difficult.

Either remove this dead code or restore it if the functionality is required.


217-220: Correct PKG_CONFIG_SYSROOT_DIR for cross-compilation and reconsider pkg-config usage.

Line 219 hardcodes PKG_CONFIG_SYSROOT_DIR=/, which breaks cross-compilation by pointing to the host root instead of the target sysroot. This is inconsistent with lines 217, 218, and 220, which all use dynamic target-specific paths with $($($(1)_type)_prefix).

Additionally, per retrieved learnings: pkg-config is not available by default on Windows, and the Firo project aims to support Windows natively. Consider whether these PKG_CONFIG_* variables should be set at all for Windows targets, or if alternative configuration methods should be used.

For immediate cross-compilation compatibility, apply this diff:

 $(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
 $(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
-$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=/
+$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=$($($(1)_type)_prefix)
 $(1)_config_env+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake

Based on learnings.


265-267: Using which command is unreliable for tool resolution.

Lines 265-267 use which to resolve tool paths for CMAKE_AR, CMAKE_NM, and CMAKE_RANLIB. This approach has issues:

  • which may not be available on all platforms (especially Windows)
  • It can fail silently or return incorrect paths
  • CMake can usually find these tools automatically via CMAKE__COMPILER settings

Consider removing the which wrapper and passing the tool names directly:

-               -DCMAKE_AR=`which $$($(1)_ar)` \
-               -DCMAKE_NM=`which $$($(1)_nm)` \
-               -DCMAKE_RANLIB=`which $$($(1)_ranlib)` \
+               -DCMAKE_AR=$$($(1)_ar) \
+               -DCMAKE_NM=$$($(1)_nm) \
+               -DCMAKE_RANLIB=$$($(1)_ranlib) \

Or verify these variables contain absolute paths in the toolchain setup.


83-92: Critical: _all_dependencies initialization still missing despite being marked as addressed.

The past review identified that $(1)_all_dependencies is never initialized before being used on line 86, causing build-ids to miss dependencies and preventing the configure step from unpacking them. This was marked as "✅ Addressed in commits 7fb6b43 to a2e426f", but lines 84-85 still show the initialization commented out.

This breaks the dependency graph for all packages including Qt 6.

Apply this diff to restore dependency tracking:

 $(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
-# $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($(1)_dependencies)))
-# $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
+$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
 $(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))
 $(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id_string))
-# $(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id))

75-79: Critical: Hardcoded patch path issue remains despite being marked as addressed.

The past review identified that line 76 hardcodes $(PATCHES_PATH)/$(1)/ which ignores package-specific $(1)_patches_path settings (e.g., qt.mk sets a custom patches_path). This was marked as "✅ Addressed in commits d5ef976 to 212ce38", but the code still contains the hardcoded path.

This will cause:

  • Missing/404 patches for packages with custom patch directories
  • Incorrect recipe hash computation
  • Build failures for Qt 6 if it uses custom patches_path

Apply this diff to fix:

 define int_get_build_recipe_hash
+$(eval $(1)_patches_path?=$(PATCHES_PATH)/$(1))
-$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1))
+$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $($(1)_patches_path)/,$($(1)_patches)) | cut -d" " -f1))
 final_build_id_long+=:[$(1)_all_file_checksums]$(foreach checksum,$($(1)_all_file_checksums),$(shell echo ":$(checksum)")):
 $(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
 endef

Also update line 304 in int_add_cmds to use $($(1)_patches_path) instead of $(PATCHES_PATH)/$(1).

src/qt/splashscreen.cpp (1)

24-24: Confirm past review: Remove unused #include <QScreen>.

The past review correctly identified that QScreen is not used in active code—it's only referenced in the commented section (lines 79-183). Either remove this include or document why it's being retained for future use.

src/qt/bitcoin.cpp (2)

497-502: Fix comment/timeout mismatch.

The comment states "500 milliseconds" but the code uses 1000ms.

Apply this diff to align them:

-    // Delay shutdown signal by 500 milliseconds
+    // Delay shutdown signal by 1000 milliseconds
     QTimer::singleShot(1000, this, [this]() {

Or use a named constant for better maintainability:

constexpr int kShutdownDelayMs = 1000;
// Delay shutdown signal by kShutdownDelayMs milliseconds
QTimer::singleShot(kShutdownDelayMs, this, [this]() {

504-506: Guard showCloseWindow() against null pointer dereference.

showCloseWindow() dereferences shutdownWindow unconditionally. If called before requestShutdown() initializes it (line 480), this will crash.

Either make it private and only call after initialization, or add a null check:

 void BitcoinApplication::showCloseWindow(){
+    if (!shutdownWindow) {
+        shutdownWindow.reset(ShutdownWindow::showShutdownWindow(window));
+    }
     shutdownWindow->show();
 }
depends/patches/qt/qtbase_skip_tools.patch (3)

1-7: The note misclassifies wrapper scripts as "unneeded."

Wrapper scripts are required by downstream Qt modules. Please update this summary to exclude "Wrapper CMake scripts" from the skipped list.


16-22: qt_internal_create_wrapper_scripts() is required for Qt builds.

Those wrapper scripts (qt-cmake, qt-configure-module) are consumed by downstream Qt modules (qttools, qttranslations) during configuration. Dropping the generator causes the CMake configure step to fail because the expected helpers are missing from the build tree. Please keep this call.


1-9: Wrapper scripts cannot be skipped—they are required by downstream Qt modules and other patches depend on them.

The dont_hardcode_pwd.patch patches qtbase/bin/qt-cmake.in and qtbase/bin/qt-configure-module.in—scripts that must exist for that patch to work. If wrapper script generation is skipped, dont_hardcode_pwd.patch will fail.

Downstream Qt modules (qttools, qttranslations) also use these wrapper scripts to configure themselves during cross-compilation builds.

The other tools (tracepointgen, tracegen, qlalr, qvkgen) can remain skipped as they have no references in the codebase.

Required change: Keep wrapper script generation enabled by restoring the qt_internal_create_wrapper_scripts() call.

src/qt/guiutil.cpp (1)

100-101: Y2038 risk persists: Remove the qint32 cast.

The migration from fromTime_t to fromSecsSinceEpoch is correct, but casting nTime to qint32 still truncates values beyond 2038. Qt6 supports 64-bit epochs directly.

Apply this diff:

-    return dateTimeStr(QDateTime::fromSecsSinceEpoch((qint32)nTime));
+    return dateTimeStr(QDateTime::fromSecsSinceEpoch(nTime));
src/qt/notificator.cpp (1)

149-152: Compile error: qDBusRegisterMetaType returns int, not a type with .id().

In Qt6, qDBusRegisterMetaType<T>() directly returns an int type ID. The .id() call is invalid.

Apply this diff:

 int FreedesktopImage::metaType()
 {
-    return qDBusRegisterMetaType<FreedesktopImage>().id();
+    return qDBusRegisterMetaType<FreedesktopImage>();
 }
depends/toolchain.cmake.in (2)

166-172: Inconsistent pattern matching for wallet_packages.

Lines 168-169 use STREQUAL "" instead of the MATCHES "^[ ]*$" pattern used elsewhere (lines 141, 148, 154, 160, 174). This contradicts the comment on lines 138-140 explaining why MATCHES should be used. Additionally, line 166 reassigns wallet_packages from @wallet_packages@, but this value was already checked using MATCHES on line 160.

Apply this diff to fix both issues:

-set(wallet_packages @wallet_packages@)
 set(bdb_packages @bdb_packages@)
-if("${wallet_packages}" STREQUAL "" OR "${bdb_packages}" STREQUAL "")
+if("@wallet_packages@" MATCHES "^[ ]*$" OR "${bdb_packages}" MATCHES "^[ ]*$")
   set(WITH_BDB OFF CACHE BOOL "")
 else()
   set(WITH_BDB ON CACHE BOOL "")
 endif()

124-134: Remove pkg-config configuration or restrict to Linux/FreeBSD only.

The verification confirms all concerns:

  1. PKG_CONFIG_ARGN is unused: Zero references in the codebase. The variable set at line 133 is never consumed by CMake or pkg-config.

  2. Windows build incompatibility: The condition at line 124 includes Windows, but pkg-config is not available by default on Windows systems. Setting PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR environment variables will fail or be ineffective on Windows builds. This contradicts the project's aim for native Windows support (confirmed by learnings from PR #1504).

  3. STATIC flag mismatch: The pkg_check_modules() calls in FindLibevent.cmake, FindZeroMQ.cmake, and FindQRencode.cmake do not use the STATIC keyword. If static linking is intended, pass STATIC directly in those pkg_check_modules() calls, not via an unused environment variable.

Either remove this entire pkg-config configuration block or restrict it to Linux/FreeBSD only by changing line 124 to:

if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|FreeBSD)$")
README.md (1)

109-125: Qt6 migration: Debian/Ubuntu GUI deps still list Qt5 packages while Fedora uses Qt6.

The Fedora snippet now correctly pulls in qt6-qttools-devel qt6-qtbase-devel, but the Debian/Ubuntu section above still instructs installing qttools5-dev qttools5-dev-tools. For consistency (and to avoid confusing users on Qt6-only builds), update the Debian/Ubuntu GUI deps to the Qt6 equivalents and double-check all package names against your target distro versions.

Example:

-# Also needed for GUI wallet only:
-sudo apt-get install qttools5-dev qttools5-dev-tools libxcb-xkb-dev bison
+# Also needed for GUI wallet only:
+sudo apt-get install qt6-tools-dev qt6-tools-dev-tools libxcb-xkb-dev bison
doc/build-unix.md (1)

93-96: Fedora Qt section still says “Qt 5 (recommended)” while listing Qt6 packages.

The heading/text mentions “Qt 5 (recommended)” but the dnf command installs qt6-qttools-devel qt6-qtbase-devel. Update the wording to “Qt 6 (recommended)” (or drop the explicit version) so the docs match the actual packages.

depends/packages/qt.mk (3)

191-195: Darwin-specific config env is still unused; consider applying it when configuring/building Qt.

You populate $(package)_config_env_darwin (OBJC/OBJCXX, and later AR/RANLIB under Guix) but $(package)_config_cmds and $(package)_build_cmds only use $(package)_config_env. To ensure Apple toolchains and Guix overrides are honored when building Qt on macOS, fold the Darwin env into those commands:

define $(package)_config_cmds
   cd qtbase && \
-  $($(package)_config_env) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
+  $($(package)_config_env) $($(package)_config_env_darwin) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
endef

define $(package)_build_cmds
-  $($(package)_config_env) cmake --build . --parallel
+  $($(package)_config_env) $($(package)_config_env_darwin) cmake --build . --parallel
endef

Also applies to: 236-247, 266-273, 343-349


55-56: Qt configure flags still conflict on zlib source and C++ standard.

Two issues remain here:

  1. Zlib source conflict

    You set both:

    $(package)_config_opts += -system-zlib
    $(package)_config_opts += -qt-zlib

    Qt expects either system zlib or bundled zlib, not both; this can lead to confusing or toolchain-dependent behavior. Drop one, e.g. keep only -system-zlib:

    $(package)_config_opts += -system-zlib

-$(package)_config_opts += -qt-zlib


2. **C++ standard inconsistency**

- Configure opts: `-c++std c++17`
- CMake opts: `-DQT_FEATURE_cxx20=ON`
- Global depends/Makefile: `CXX_STANDARD ?= c++20`

These disagree and may confuse Qt’s own feature checks or toolchain detection. Align them on a single standard (likely C++20 if you’ve decided to require it) by updating the configure flag:

```diff
-$(package)_config_opts += -c++std c++17
+$(package)_config_opts += -c++std c++20

and keeping QT_FEATURE_cxx20 enabled.

Also applies to: 88-89, 101-103, 196-199


276-283: Undefined $(package)_download_file in Qt fetch still breaks the first download.

The first fetch_file call uses $($(package)_download_file) as the remote filename, but that variable is never defined in this file. The other archives use the pattern “remote == local filename”.

Fix it like this:

-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \
depends/Makefile (1)

49-51: C++20 baseline is still undocumented and stricter than Qt6 requires.

CXX_STANDARD ?= c++20 bumps the global requirement beyond Qt 6’s C++17 baseline, but the repo docs don’t spell out a C++20 compiler requirement or the features that justify it. Either:

  • Revert this to c++17, or
  • Document the C++20 requirement (minimum GCC/Clang/MSVC versions and the specific C++20 features used) in the build docs so downstreams know what toolchains are needed.

This was raised previously and appears unresolved.

src/qt/CMakeLists.txt (1)

57-74: Add find_package(Qt6 COMPONENTS LinguistTools REQUIRED) before using Qt6 translation tools.

This CMakeLists uses Qt6::lrelease, Qt6::lupdate, and Qt6::lconvert for QM generation and the translate target, but there’s no visible find_package(Qt6 COMPONENTS LinguistTools REQUIRED) in this scope. On setups where LinguistTools isn’t pulled in by a parent, configuration will fail due to missing imported targets.

Add a find_package(Qt6 COMPONENTS LinguistTools REQUIRED) near the top of this file (or ensure it’s present in a parent CMakeLists that covers this directory) before these commands.

Also applies to: 190-192, 347-383, 396-407

depends/packages/native_qt.mk (2)

103-110: Undefined $(package)_download_file breaks native Qt fetch.

$(package)_download_file is never defined in this file, so the first fetch_file call will pass an empty remote filename and fail. The other fetches already use the pattern “remote == local filename”.

Mirror that pattern here:

-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \

155-158: Guard mv translations/ .. so the postprocess step doesn’t fail when translations are absent.

If translations aren’t built, mv translations/ .. will error and abort the postprocess step. Make the move conditional:

-  rm -rf doc/ && \
-  mv translations/ ..
+  rm -rf doc/ && \
+  if [ -d translations ]; then mv translations ..; fi
🧹 Nitpick comments (6)
src/qt/coincontroldialog.cpp (2)

396-404: Consider removing obsolete Qt5 workaround.

This temporary fix was for Qt 5.3-5.4 tristate checkbox issues and is noted as fixed in Qt 5.5+. Since the codebase is now migrating to Qt 6, this workaround is likely no longer necessary and could be removed to reduce code complexity.

Apply this diff to remove the obsolete workaround:

-    // TODO: Remove this temporary qt5 fix after Qt5.3 and Qt5.4 are no longer used.
-    //       Fixed in Qt5.5 and above: https://bugreports.qt.io/browse/QTBUG-43473
-#if QT_VERSION >= 0x050000
-    else if (column == COLUMN_CHECKBOX && item->childCount() > 0)
-    {
-        if (item->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked && item->child(0)->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked)
-            item->setCheckState(COLUMN_CHECKBOX, Qt::Checked);
-    }
-#endif

115-119: Remove obsolete Qt4 version check.

With the migration to Qt6, the Qt4 compatibility code is no longer needed. Simplify by using only the Qt5+ API.

Apply this diff:

-    // click on header
-#if QT_VERSION < 0x050000
-    ui->treeWidget->header()->setClickable(true);
-#else
     ui->treeWidget->header()->setSectionsClickable(true);
-#endif
     connect(ui->treeWidget->header(), &QHeaderView::sectionClicked, this, &CoinControlDialog::headerSectionClicked);
depends/funcs.mk (2)

268-268: Trailing slash in CMAKE_INSTALL_LIBDIR is unconventional.

Line 268 sets CMAKE_INSTALL_LIBDIR=lib/ with a trailing slash, which is unusual. CMake path variables typically don't have trailing slashes.

Apply this diff:

-               -DCMAKE_INSTALL_LIBDIR=lib/ \
+               -DCMAKE_INSTALL_LIBDIR=lib \

284-287: Remove commented-out logging scaffolding.

Lines 285-287 contain commented-out logging code. If logging is not needed, remove this dead code. If it is needed, uncomment and ensure the related $(1)_build_log path (also commented at line 107) is active.

src/qt/guiutil.cpp (1)

310-319: LGTM! Clean refactor to reduce duplication.

The new helper function properly extracts file suffixes from filter strings using QRegularExpression and eliminates code duplication in getSaveFileName and getOpenFileName.

depends/packages/native_qt.mk (1)

90-101: $(package)_config_env is defined but never used; consider applying it to configure/build.

You set $(package)_config_env (CC/CXX and Darwin OBJC/OBJCXX) and $(package)_cmake_opts, but $(package)_config_cmds and $(package)_build_cmds invoke ./configure and cmake --build without that environment. If the intent is to control the compilers/linker flags used for native Qt, prefix those commands with $(package)_config_env:

define $(package)_config_cmds
-  cd qtbase && \
-  ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
+  cd qtbase && \
+  $($(package)_config_env) ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts)
endef

define $(package)_build_cmds
-  cmake --build . -- $$(filter -j%,$$(MAKEFLAGS))
+  $($(package)_config_env) cmake --build . -- $$(filter -j%,$$(MAKEFLAGS))
endef

Also applies to: 142-149, 151-153

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 73216db and 4d8cbbb.

⛔ Files ignored due to path filters (1)
  • .github/workflows/ci-master.yml is excluded by !**/*.yml
📒 Files selected for processing (62)
  • CMakeLists.txt (1 hunks)
  • README.md (1 hunks)
  • cmake/module/FindQt.cmake (0 hunks)
  • contrib/debian/changelog (1 hunks)
  • contrib/debian/rules (1 hunks)
  • contrib/guix/libexec/build.sh (1 hunks)
  • contrib/rpm/README.md (1 hunks)
  • contrib/rpm/bitcoin.spec (3 hunks)
  • depends/Makefile (3 hunks)
  • depends/config.site.in (1 hunks)
  • depends/funcs.mk (7 hunks)
  • depends/hosts/darwin.mk (1 hunks)
  • depends/packages/libxcb_util_cursor.mk (1 hunks)
  • depends/packages/native_qt.mk (1 hunks)
  • depends/packages/packages.mk (1 hunks)
  • depends/packages/qt.mk (2 hunks)
  • depends/packages/qt_details.mk (1 hunks)
  • depends/packages/zeromq.mk (1 hunks)
  • depends/patches/native_qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/native_qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/native_qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/native_qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/native_qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/patches/qt/dont_hardcode_pwd.patch (1 hunks)
  • depends/patches/qt/memory_resource.patch (0 hunks)
  • depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_native_float16.patch (1 hunks)
  • depends/patches/qt/qtbase_avoid_qmain.patch (1 hunks)
  • depends/patches/qt/qtbase_platformsupport.patch (1 hunks)
  • depends/patches/qt/qtbase_plugins_cocoa.patch (1 hunks)
  • depends/patches/qt/qtbase_skip_tools.patch (1 hunks)
  • depends/patches/qt/qttools_skip_dependencies.patch (1 hunks)
  • depends/patches/qt/rcc_hardcode_timestamp.patch (1 hunks)
  • depends/toolchain.cmake.in (3 hunks)
  • doc/build-unix.md (1 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2.h (1 hunks)
  • src/crypto/MerkleTreeProof/blake2/blake2b.c (1 hunks)
  • src/init.cpp (2 hunks)
  • src/leveldb/include/leveldb/env.h (1 hunks)
  • src/leveldb/util/env.cc (1 hunks)
  • src/leveldb/util/env_posix.cc (3 hunks)
  • src/leveldb/util/env_windows.cc (3 hunks)
  • src/qt/CMakeLists.txt (8 hunks)
  • src/qt/bitcoin.cpp (4 hunks)
  • src/qt/bitcoinamountfield.cpp (1 hunks)
  • src/qt/bitcoingui.cpp (8 hunks)
  • src/qt/clientmodel.cpp (3 hunks)
  • src/qt/coincontroldialog.cpp (1 hunks)
  • src/qt/guiutil.cpp (5 hunks)
  • src/qt/notificator.cpp (3 hunks)
  • src/qt/recentrequeststablemodel.cpp (1 hunks)
  • src/qt/recentrequeststablemodel.h (1 hunks)
  • src/qt/rpcconsole.cpp (3 hunks)
  • src/qt/sendcoinsentry.cpp (2 hunks)
  • src/qt/splashscreen.cpp (1 hunks)
  • src/qt/test/CMakeLists.txt (1 hunks)
  • src/qt/transactionfilterproxy.cpp (1 hunks)
  • src/qt/transactiontablemodel.cpp (2 hunks)
  • src/qt/utilitydialog.cpp (2 hunks)
  • src/qt/winshutdownmonitor.cpp (1 hunks)
  • src/qt/winshutdownmonitor.h (1 hunks)
💤 Files with no reviewable changes (2)
  • cmake/module/FindQt.cmake
  • depends/patches/qt/memory_resource.patch
🚧 Files skipped from review as they are similar to previous changes (26)
  • src/init.cpp
  • depends/patches/native_qt/qttools_skip_dependencies.patch
  • src/qt/recentrequeststablemodel.h
  • CMakeLists.txt
  • contrib/guix/libexec/build.sh
  • src/qt/bitcoinamountfield.cpp
  • depends/patches/qt/dont_hardcode_pwd.patch
  • depends/packages/packages.mk
  • depends/config.site.in
  • depends/patches/qt/qtbase_platformsupport.patch
  • depends/patches/native_qt/qtbase_avoid_native_float16.patch
  • depends/patches/qt/qtbase_avoid_qmain.patch
  • depends/patches/native_qt/qtbase-moc-ignore-gcc-macro.patch
  • depends/patches/qt/qttools_skip_dependencies.patch
  • depends/packages/qt_details.mk
  • depends/patches/native_qt/qtbase_skip_tools.patch
  • depends/packages/libxcb_util_cursor.mk
  • contrib/debian/rules
  • depends/patches/native_qt/rcc_hardcode_timestamp.patch
  • src/qt/rpcconsole.cpp
  • src/crypto/MerkleTreeProof/blake2/blake2b.c
  • contrib/rpm/README.md
  • src/qt/utilitydialog.cpp
  • depends/patches/qt/qtbase_avoid_native_float16.patch
  • src/qt/sendcoinsentry.cpp
  • src/crypto/MerkleTreeProof/blake2/blake2.h
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-03-31T04:27:35.223Z
Learnt from: aleflm
Repo: firoorg/firo PR: 1504
File: CMakeLists.txt:457-484
Timestamp: 2025-03-31T04:27:35.223Z
Learning: Pkg-config should not be used in the Firo CMake build system as it's not available by default on Windows, and the project aims to support Windows natively in the future.

Applied to files:

  • depends/funcs.mk
  • depends/toolchain.cmake.in
  • src/qt/CMakeLists.txt
  • depends/packages/qt.mk
📚 Learning: 2024-12-10T11:55:45.732Z
Learnt from: gevorgvoskanyan
Repo: firoorg/firo PR: 1497
File: src/qt/bitcoingui.cpp:1505-1505
Timestamp: 2024-12-10T11:55:45.732Z
Learning: In `src/qt/bitcoingui.cpp`, within the `resizeEvent` function, when adding new actions to the toolbar, the action width calculation remains as `int actionWidth = newWidth / 7;`, regardless of the number of actions.

Applied to files:

  • src/qt/bitcoingui.cpp
🧬 Code graph analysis (6)
src/leveldb/util/env_posix.cc (1)
src/leveldb/util/env_windows.cc (1)
  • shutdown_requested_ (680-683)
src/qt/winshutdownmonitor.h (1)
src/qt/winshutdownmonitor.cpp (2)
  • nativeEventFilter (19-54)
  • nativeEventFilter (19-19)
src/leveldb/util/env_windows.cc (1)
src/leveldb/util/env_posix.cc (1)
  • shutdown_requested_ (732-735)
src/leveldb/util/env.cc (1)
src/init.cpp (2)
  • Shutdown (235-347)
  • Shutdown (235-235)
src/qt/clientmodel.cpp (1)
src/chainparams.cpp (4)
  • Params (1348-1351)
  • Params (1348-1348)
  • Params (1353-1365)
  • Params (1353-1353)
src/leveldb/include/leveldb/env.h (2)
src/init.cpp (2)
  • Shutdown (235-347)
  • Shutdown (235-235)
src/leveldb/util/env.cc (2)
  • Shutdown (90-90)
  • Shutdown (90-90)
🔇 Additional comments (31)
src/leveldb/util/env.cc (1)

90-91: LGTM! Base class empty implementation is appropriate.

The empty implementation provides a sensible default for the base Env class, which has no background threads or resources requiring cleanup. Platform-specific implementations (PosixEnv, WindowsEnv) override this with actual shutdown logic.

src/leveldb/util/env_windows.cc (2)

709-709: LGTM! Shutdown flag properly declared.

The shutdown_requested_ atomic flag is correctly declared with default initialization to false.


777-780: LGTM! Background thread correctly observes shutdown signal.

The early exit when shutdown_requested_ is true ensures the background thread terminates cleanly during shutdown, preventing indefinite blocking on the condition variable.

src/leveldb/util/env_posix.cc (3)

732-735: LGTM! Shutdown implementation is correct.

The Shutdown() override properly sets the shutdown flag and signals the background thread via SignalAll(), ensuring the thread wakes up from Wait() to check the shutdown flag.


768-768: LGTM! Shutdown flag properly declared.

The shutdown_requested_ atomic flag is correctly declared with default initialization to false.


827-830: LGTM! Background thread correctly observes shutdown signal.

The early exit when shutdown_requested_ is true ensures the background thread terminates cleanly, preventing the thread from blocking indefinitely on the condition variable during shutdown.

depends/patches/qt/qtbase_plugins_cocoa.patch (1)

1-21: Patch verified: No issues found.

This patch addresses CMake issue 23464, where AUTOMOC depends on precompiled header files that aren't generated when all target sources skip using the precompiled header. The workaround correctly disables precompiled headers for QCocoaIntegrationPlugin when both conditions are met: CMake < 3.25 and QT_FEATURE_sessionmanager is disabled. The patch format and conditional logic are valid, and this fix is not present in Qt 6.7.3 upstream—the downstream patch is necessary.

src/qt/recentrequeststablemodel.cpp (1)

245-245: LGTM: Qt6 API migration.

The change from toTime_t() to toSecsSinceEpoch() is the correct Qt6 equivalent. Both return seconds since Unix epoch, maintaining identical comparison semantics.

src/qt/transactiontablemodel.cpp (1)

736-736: LGTM: Qt6 datetime API migration.

Both changes correctly replace the deprecated fromTime_t() with fromSecsSinceEpoch() for Qt6 compatibility. The semantics and casting remain unchanged.

Also applies to: 765-765

depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (1)

10-14: LGTM: Necessary moc workaround for GCC.

The patch correctly adds _GLIBCXX_VISIBILITY to the moc macro ignore list, following the same pattern as existing __attribute__ and __declspec__ entries. This addresses a known Qt issue (QTBUG-83160) where moc encounters GCC internal macros.

src/qt/transactionfilterproxy.cpp (1)

15-17: LGTM: Qt6 datetime API migration with reasonable bounds.

The change from fromTime_t() to fromSecsSinceEpoch() is correct for Qt6. The use of 0xFFFFFFFF (year 2106) for MAX_DATE is a reasonable far-future boundary for transaction filtering.

depends/patches/qt/rcc_hardcode_timestamp.patch (1)

1-24: LGTM: Reproducible build support.

Hardcoding the timestamp to 1 ensures deterministic Qt resource compilation, which is essential for reproducible builds (e.g., Guix). This is a standard technique that sacrifices runtime file modification tracking for build reproducibility.

src/qt/winshutdownmonitor.cpp (1)

19-19: LGTM: Required Qt6 nativeEventFilter signature update.

The parameter type change from long* to qintptr* is required by Qt6's QAbstractNativeEventFilter interface. This is especially important on 64-bit Windows where qintptr is 64-bit while long remains 32-bit.

src/qt/clientmodel.cpp (3)

167-171: LGTM: Qt6 datetime API migration in getLastBlockDate.

Both replacements of fromTime_t() with fromSecsSinceEpoch() are correct for Qt6. The method correctly handles both the active chain tip and the genesis block fallback.


289-289: LGTM: Qt6 datetime API migration in formatClientStartupTime.

The change from fromTime_t() to fromSecsSinceEpoch() is correct for Qt6 compatibility.


375-375: LGTM: Qt6 datetime API migration in BlockTipChanged.

The change from fromTime_t() to fromSecsSinceEpoch() is correct for Qt6 when emitting the numBlocksChanged signal.

src/qt/test/CMakeLists.txt (1)

35-36: LGTM! Clean Qt6 migration.

The linkage correctly updates from Qt5 to Qt6 module names, consistent with the broader Qt6 migration in this PR.

src/qt/winshutdownmonitor.h (1)

21-21: LGTM! Correct Qt6 API migration.

Changing from long* to qintptr* aligns with Qt6's portable integer types and ensures cross-platform compatibility.

src/qt/bitcoingui.cpp (4)

314-365: LGTM! Keyboard shortcuts correctly migrated for Qt6.

The migration from direct modifier constants (Qt::ALT + Qt::Key_N) to string-based shortcuts (Alt+%1) normalizes cross-platform definitions and aligns with Qt6 best practices.


389-389: Correct: Use bitwise OR for combining Qt keyboard modifiers.

The change from + to | properly uses bitwise OR to combine Qt::CTRL and Qt::Key_Q, which is the correct Qt API usage.


462-463: LGTM! Shortcut modifier combination corrected.

Using bitwise OR (|) instead of addition (+) is the correct way to combine Qt keyboard modifiers.


554-554: Correct Qt6 time API migration.

The change from fromTime_t to fromSecsSinceEpoch aligns with Qt6 APIs.

src/qt/notificator.cpp (2)

30-55: LGTM! Proper DBus image marshalling structure for Qt6.

The FreedesktopImage class correctly defines the structure and operators needed to marshal images over DBus, aligning with Qt6 APIs.


154-158: Correct: Using QVariant::fromValue for Qt6.

The change from raw meta-type/pointer construction to QVariant::fromValue(fimg) is the correct Qt6 pattern for value-based QVariant usage.

depends/toolchain.cmake.in (3)

17-19: LGTM! Proper cross-compilation target configuration.

Setting compiler target triplets for cross-compilation is correct and ensures consistent toolchain behavior.


103-113: Correct: Simplified find root path configuration.

The direct assignment of CMAKE_FIND_ROOT_PATH and the guard to prevent duplicate "/" entries in CMAKE_PREFIX_PATH are appropriate improvements.


141-145: LGTM! Correct Qt6 configuration with consistent pattern matching.

The use of MATCHES "^[ ]*$" properly handles empty/whitespace-only values, and setting Qt6_ROOT when GUI is enabled is appropriate for Qt6 discovery.

depends/patches/native_qt/dont_hardcode_pwd.patch (1)

1-50: LGTM: /bin/pwdpwd change is correct and improves portability.

Using pwd instead of hardcoding /bin/pwd makes the Qt scripts work on non-FHS systems (e.g., Guix) while remaining fine on typical Linux distros. No issues spotted.

contrib/rpm/bitcoin.spec (1)

12-13: Qt6 RPM spec updates: verify --with-gui=qt6 flag and qt6- BuildRequires on your target Fedora/RHEL versions.*

The spec now defaults to --with-gui=qt6 and depends on qt6-qtbase-devel and qt6-linguist, which matches the Qt6 migration. Please confirm:

  • The underlying configure in this tree accepts --with-gui=qt6 as intended.
  • The qt6 package names are correct for the Fedora/RPM platforms you actually build on (no renamed subpackages).

Also applies to: 70-73, 432-433

depends/Makefile (1)

161-173: Native Qt integration and toolchain-only install wiring look consistent.

Including $(qt_native_packages_) in native_packages and making install depend only on $(host_prefix)/toolchain.cmake aligns depends with the new native_qt + CMake toolchain flow. No issues spotted here.

Also applies to: 275-276

src/qt/CMakeLists.txt (1)

14-26: Qt6 plugin imports and linkage look correct.

The migration to Qt6 (Qt6::Core type probe, qt6_import_plugins, and platform-specific plugin targets) plus switching to Qt6::Widgets/Network/DBus for firoqt/firo-qt is consistent and idiomatic for Qt6. Nothing obviously problematic here.

Also applies to: 166-188, 241-261, 268-287, 306-310

CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \
LDFLAGS="$$($(1)_ldflags)" \
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_config_opts)
cmake -G "Unix Makefiles" \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Hardcoded "Unix Makefiles" generator may fail on Windows.

Line 263 explicitly sets the CMake generator to "Unix Makefiles", which is not available on Windows. Since the Firo project aims to support Windows natively (per retrieved learnings), this will break Windows builds.

Consider one of these approaches:

  1. Remove -G "Unix Makefiles" to let CMake choose the default generator
  2. Use Ninja generator which works cross-platform: -G "Ninja"
  3. Make it conditional: use "Unix Makefiles" on Unix, but allow CMake's default on Windows

Based on learnings.

🤖 Prompt for AI Agents
In depends/funcs.mk around line 263, the cmake invocation hardcodes the
generator as "Unix Makefiles", which fails on Windows; change this to either
remove the -G "Unix Makefiles" flag so CMake picks the platform default, or
switch to a cross-platform generator like -G "Ninja", or implement a simple
conditional: if on Windows do not pass -G (or pass Ninja if available),
otherwise keep "Unix Makefiles"; update related docs/variables to reflect the
chosen approach and ensure CI/build scripts still work.

else
ifneq ($(host),$(build))
$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system)
$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system_name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify CMAKE_SYSTEM_NAME mapping is defined for all target platforms.

Line 276 uses $($(host_os)_cmake_system_name) which requires that each supported host_os has a corresponding _cmake_system_name variable defined (e.g., linux_cmake_system_name, darwin_cmake_system_name, mingw32_cmake_system_name). If this mapping is missing for any target OS, CMake cross-compilation configuration will fail.

Run this script to verify the mappings exist:


🏁 Script executed:

#!/bin/bash
# Check if cmake_system_name is defined for all host operating systems

echo "Checking for cmake_system_name definitions..."
rg -n "_cmake_system_name\s*[:?]?=" depends/hosts/

Length of output: 222



---

🏁 Script executed:

```shell
#!/bin/bash
# List all host OS files and verify each has a _cmake_system_name definition

echo "All .mk files in depends/hosts/:"
fd --type f "\.mk$" depends/hosts/

echo ""
echo "Checking for any host OS without _cmake_system_name mapping:"
for file in $(fd --type f "\.mk$" depends/hosts/); do
  basename_file=$(basename "$file" .mk)
  if ! grep -q "${basename_file}_cmake_system_name" "$file"; then
    echo "MISSING: $file (no ${basename_file}_cmake_system_name definition)"
  fi
done

Length of output: 267



---

🏁 Script executed:

```shell
#!/bin/bash
# Understand the purpose of default.mk and whether "default" is used as host_os

echo "=== Contents of default.mk (first 30 lines) ==="
head -30 depends/hosts/default.mk

echo ""
echo "=== Searching for host_os assignments/references ==="
rg -n "host_os\s*[:=]" depends/ -A 2 -B 2 | head -40

Length of output: 1958



---

🏁 Script executed:

```shell
#!/bin/bash
# Check for freebsd references and verify CMAKE_SYSTEM_NAME conditional usage

echo "=== Searching for freebsd references ==="
rg -n "freebsd" depends/

echo ""
echo "=== Context around line 276 where CMAKE_SYSTEM_NAME is set ==="
sed -n '270,285p' depends/funcs.mk

Length of output: 1515


Add missing CMAKE_SYSTEM_NAME mappings for freebsd and handle unsupported platforms.

Line 276 references $($(host_os)_cmake_system_name) which is currently undefined for freebsd, despite freebsd being recognized as a valid host_os in Makefile (lines 97, 84). Cross-compilation for freebsd will fail with an undefined CMAKE_SYSTEM_NAME variable. Additionally, the fallback logic in Makefile (lines 103-104) allows arbitrary host_os values for unrecognized platforms, which would similarly lack corresponding _cmake_system_name definitions. Either add freebsd_cmake_system_name to a new depends/hosts/freebsd.mk file (or extend an existing file) and define mappings for other supported OSes, or add conditional logic to handle missing platform mappings gracefully.

🤖 Prompt for AI Agents
In depends/funcs.mk around line 276, $(host_os)_cmake_system_name is referenced
but not defined for freebsd (and may be missing for arbitrary/unsupported
host_os), causing undefined CMAKE_SYSTEM_NAME during cross-compilation; add a
new depends/hosts/freebsd.mk (or extend an existing host file) that defines
freebsd_cmake_system_name (e.g., set to FreeBSD) and any other supported OS ->
CMAKE_SYSTEM_NAME mappings used by your build, and update depends/funcs.mk to
check whether $($(host_os)_cmake_system_name) is non-empty before appending
-DCMAKE_SYSTEM_NAME, emitting a clear error or using a safe fallback if the
mapping is missing so unsupported host_os values fail fast with a descriptive
message.

Comment on lines +366 to +371
# $(foreach native_package,$(native_packages),$(eval include packages/$(native_package).mk))
# $(foreach package,$(packages),$(eval include packages/$(package).mk))
$(foreach package,$(all_packages),$(eval include packages/$(package).mk))

# set build properties for included package files
# $(foreach package,$(all_packages),$(eval $(call int_get_build_properties,$(package))))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Clean up commented-out package processing code.

Lines 366-367 show the old pattern of separately including native and regular packages (now consolidated on line 368, which is fine). However, lines 370-371 reference int_get_build_properties which is entirely commented out at lines 116-125.

For consistency, either:

  1. Remove the commented-out call to int_get_build_properties (lines 370-371) since the function doesn't exist
  2. Or restore both the function definition and its invocation if the functionality is needed
🤖 Prompt for AI Agents
In depends/funcs.mk around lines 366 to 371, there is a leftover commented-out
invocation of int_get_build_properties on lines 370-371 while the function
definition is commented out earlier; remove the commented call lines 370-371 to
clean up dead code, or alternatively restore/uncomment the function definition
at its original location (lines ~116-125) and uncomment this invocation so the
build-properties logic is consistent; prefer deleting the commented invocation
if that function is not needed, otherwise restore both definition and invocation
together.

ui->treeWidget->setAlternatingRowColors(true);
QFlags<Qt::ItemFlag> flgCheckbox = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable;
QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsTristate;
QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsUserTristate;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

Verify tristate behavior; consider adding Qt::ItemIsAutoTristate.

In Qt6, Qt::ItemIsTristate was split into Qt::ItemIsUserTristate (user can cycle states) and Qt::ItemIsAutoTristate (parent state reflects children). For tree views where parent checkboxes should automatically show PartiallyChecked based on child states, both flags are typically required.

Consider testing the checkbox behavior or updating to:

-    QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsUserTristate;
+    QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsUserTristate | Qt::ItemIsAutoTristate;

Run this script to check Qt6 documentation and verify the expected behavior:

Additionally, the Qt5 workaround on lines 396-404 might no longer be necessary with Qt6's improved tristate handling.


🏁 Script executed:

#!/bin/bash
# Search for other usages of ItemIsUserTristate in the Qt codebase to see patterns
rg -n "ItemIsUserTristate" --type=cpp -C 2

# Search for any ItemIsAutoTristate usage
rg -n "ItemIsAutoTristate" --type=cpp -C 2

Length of output: 522



🏁 Script executed:

#!/bin/bash
# View the Qt5 workaround mentioned (lines 396-404)
sed -n '390,410p' src/qt/coincontroldialog.cpp

# View how flgTristate is used (around line 701)
sed -n '695,715p' src/qt/coincontroldialog.cpp

# Search for state change handling or signal connections related to tree widget
rg -n "itemChanged|stateChanged|CheckStateRole" src/qt/coincontroldialog.cpp -A 3

Length of output: 1718



🏁 Script executed:

#!/bin/bash
# Find the viewItemChanged handler
rg -n "void CoinControlDialog::viewItemChanged" src/qt/coincontroldialog.cpp -A 30

Length of output: 1621



🌐 Web query:

Qt6 ItemIsUserTristate ItemIsAutoTristate checkbox tristate behavior difference

💡 Result:

Short answer

  • ItemIsUserTristate: item is a true 3‑state checkbox the user can cycle through Unchecked → PartiallyChecked → Checked (you must also make it checkable). The partial state is directly user‑selectable. [1][2]

  • ItemIsAutoTristate: the item becomes tristate only because the view/model manages the parent state from its children (Checked if all children checked, Unchecked if none, PartiallyChecked if some). The partial state is produced automatically from children and is not intended to be toggled directly by the user. [1][3]

Notes

  • Use setUserTristate / setAutoTristate (or setUserTristate on QStandardItem) to pick the behavior. [2][1]
  • QML/CheckBox nextCheckState examples show the difference in what the user cycling does vs programmatic/derived partial states. [3]

Sources
[1] Qt C++ enums (Qt::ItemIsAutoTristate / ItemIsUserTristate).
[2] QStandardItem / setUserTristate / setAutoTristate docs.
[3] Qt Quick Controls CheckBox nextCheckState / tristate docs.


Add Qt::ItemIsAutoTristate flag to preserve automatic parent-child checkbox state synchronization.

In Qt6, the deprecated Qt::ItemIsTristate was split into two flags. Your change to Qt::ItemIsUserTristate is incomplete and breaks automatic parent state updates.

  • Qt6's ItemIsUserTristate allows user to cycle through 3 states, but the partial state is user-selectable only.
  • ItemIsAutoTristate automatically manages parent state based on children—showing PartiallyChecked when some children are checked.

Qt5's ItemIsTristate provided both capabilities. The code currently lacks automatic parent-child synchronization, breaking the tree view's expected behavior where parent checkboxes reflect child selection states.

Update line 681:

-    QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsUserTristate;
+    QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsUserTristate | Qt::ItemIsAutoTristate;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsUserTristate;
QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsUserTristate | Qt::ItemIsAutoTristate;
🤖 Prompt for AI Agents
In src/qt/coincontroldialog.cpp around line 681, the item flag set is missing
Qt::ItemIsAutoTristate which is required in Qt6 to preserve automatic
parent-child checkbox synchronization; update the QFlags assignment to include
Qt::ItemIsAutoTristate alongside Qt::ItemIsUserTristate so parents reflect
children (i.e., add the Qt::ItemIsAutoTristate flag to the bitwise OR sequence).

@aleflm aleflm mentioned this pull request Nov 28, 2025
@reubenyap reubenyap merged commit 432e618 into firoorg:master Dec 1, 2025
19 of 20 checks passed
aleflm added a commit to navidR/firo that referenced this pull request Dec 15, 2025
Add required new build files
    Update some qt patch files
    Update makefile and packages
    Update qt makefile
    Fix x86_64-linux-gnu, aarch64-linux-gnu and x86_64-w64-mingw32
    Fix not recognizing compiler problem
    Test for cross compilation on CI
    Reafctor: deprecated QRegExp  -> QRegularExpression
    Refactor: replace the function in QDataTime to compatible with Qt6:
    - Add qtcompat header file to better maintainability
    - Replace deprecated QDateTime::fromTime_t() with fromSecsSinceEpoch()
    - Replace deprecated QDateTime::toTime_t() with toSecsSinceEpoch()
    - Add QT_DATETIME_FROM_TIME_T() and QT_DATETIME_TO_TIME_T() macros
    Refactor: update key combination handling for Qt 6 compatibility
    Refactor: deprecated QDesktopWidget -> QScreen
    Refactor: add Qt::ItemFlag compatibility for Qt 6
    Refactor: remove Qt compatibility layer and update to Qt 6 APIs
    Refactor:  rename the functions and structure to avoid the conflict (Qt6+ use blake2 withing itself)
    Refactor: replace copy constructor with constructor (copy constructor is protected in Qt6)
    Add translation file generation and dependencies for firoqt
    Refactor: add some include header and some minor changes
    Remove skiping rpath in cmake
    Refactor: change parameter type from long to qintptr in nativeEventFilter method
    Add patch file for native_qt to resolve native f16 issue on apple targets
    Refactor: enhance the toolchain file (according to Bitcoin toolchain)
    Fix a definition of env in zeromq.mk
    Update the funcs to be like Bitcoin
    Pass pkg_config_path in CI + install binutils for windows target
    Add some flags for cross-compiling for apple targets
    Pass pkg_config_path and unset some env variables for apple targets in build.sh
    Update qt.mk:
    . Pass the compilers and flags as basic flags.
    . Pass windres for mingw target.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants